cfg_opt_t opts[] = {
CFG_STR("username", "", CFGF_NONE),
CFG_STR("scanner_url", "", CFGF_NONE),
+ CFG_INT("default_log_level", 0, CFGF_NONE),
CFG_INT("heartbeat_seconds", 1, CFGF_NONE),
CFG_BOOL("ssl_verify", 0, CFGF_NONE),
CFG_END()
_copy_config_string_to_config_value(cfg, "scanner_url", &config->scanner_url);
_copy_config_string_to_config_value(cfg, "username", &config->username);
+ config->log_level = cfg_getint(cfg, "default_log_level");
+ char log_level_str[2];
+ snprintf(log_level_str, 2, "%i", config->log_level);
+ setenv("KDS_S2000W_NET_DEBUG", log_level_str, 0);
config->heartbeat = cfg_getint(cfg, "heartbeat_seconds");
if (config->heartbeat < 1)
config->heartbeat = 1;
scanner_url = "https://scanner.example.com"
username = "muster"
-# Scanner heart beat is by default 1 seconds before check next scan status,
+
+# log levels: 0=OFF, 1=FATAL, 2=ERROR, 3=WARN, 4=INFO, 5=DEBUG, 6=ALL
+# set KDS_S2000W_NET_DEBUG enviroment variable
+# default_log_level (default: 0)
+default_log_level = 3
+
+# wait seconds before pull next scan status
+# heartbeat_seconds (default: 1)
# heartbeat_seconds = 1
-# SSL Verification (default: false)
+
+# ssl_verify (default: false)
# ssl_verify = true
\ No newline at end of file