1
0
Fork 0

default log level fix

This commit is contained in:
bagyenda 2010-11-26 14:26:09 +00:00
parent 2891e9bb27
commit 17a2cbfc90
2 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,5 @@
2010-11-26 P. A. Bagyenda <bagyenda@dsmagic.com>
* Minor fix for default log level (thanks to Piotr Isajew (pki at ex.com.pl)
2010-11-23 P. A. Bagyenda <bagyenda@dsmagic.com> 2010-11-23 P. A. Bagyenda <bagyenda@dsmagic.com>
* Minor fix in handling of extra mm7 headers * Minor fix in handling of extra mm7 headers
2010-11-16 P. A. Bagyenda <bagyenda@dsmagic.com> 2010-11-16 P. A. Bagyenda <bagyenda@dsmagic.com>

View File

@ -49,10 +49,13 @@ int mms_load_core_settings(mCfg *cfg, mCfgGrp *cgrp)
Octstr *log, *alog; Octstr *log, *alog;
Octstr *http_proxy_host; Octstr *http_proxy_host;
Octstr *our_interface; Octstr *our_interface;
long loglevel; long loglevel = 0;
if (cgrp == NULL) if (cgrp == NULL)
panic(0,"Missing required group `core' in config file!"); panic(0,"Missing required group `core' in config file!");
if (mms_cfg_get_int(cfg, cgrp, octstr_imm("log-level"), &loglevel) == -1)
loglevel = 0;
/* Set the log file. */ /* Set the log file. */
log = mms_cfg_get(cfg, cgrp, octstr_imm("log-file")); log = mms_cfg_get(cfg, cgrp, octstr_imm("log-file"));
@ -61,8 +64,6 @@ int mms_load_core_settings(mCfg *cfg, mCfgGrp *cgrp)
octstr_destroy(log); octstr_destroy(log);
} }
if (mms_cfg_get_int(cfg, cgrp, octstr_imm("log-level"), &loglevel) == -1)
loglevel = 0;
log_set_output_level(loglevel); log_set_output_level(loglevel);
/* Get access log and open it. */ /* Get access log and open it. */