Skip to content

Commit aa9d446

Browse files
authored
Merge pull request #8262 from liranmauda/liran-Add-NooBaa-Log-Level-to-agent-cli
agent_cli.js respect NOOBAA_LOG_LEVEL environment variable
2 parents 408c24d + bf4c877 commit aa9d446

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/agent/agent_cli.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ const os_utils = require('../util/os_utils');
2323
const Semaphore = require('../util/semaphore');
2424
const json_utils = require('../util/json_utils');
2525
const addr_utils = require('../util/addr_utils');
26+
const debug_config = require('../util/debug_config');
2627

2728

29+
if (process.env.NOOBAA_LOG_LEVEL) {
30+
const dbg_conf = debug_config.get_debug_config(process.env.NOOBAA_LOG_LEVEL);
31+
dbg_conf.core.map(module => dbg.set_module_level(dbg_conf.level, module));
32+
}
33+
2834
const CREATE_TOKEN_RESPONSE_TIMEOUT = 30 * 1000; // 30s timeout for master to respond to HB
2935
const CREATE_TOKEN_RETRY_INTERVAL = 10 * 1000;
3036
const DETECT_NEW_DRIVES_INTERVAL = 60 * 1000;

0 commit comments

Comments
 (0)