Skip to content

Commit bf4c877

Browse files
committed
agent_cli.js respect NOOBAA_LOG_LEVEL environment variable
agent_cli.js respect NOOBAA_LOG_LEVEL environment variable Signed-off-by: liranmauda <liran.mauda@gmail.com>
1 parent 408c24d commit bf4c877

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)