diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index 865048a..910e881 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -1,3 +1,5 @@ +2010-11-26 P. A. Bagyenda + * Minor fix for default log level (thanks to Piotr Isajew (pki at ex.com.pl) 2010-11-23 P. A. Bagyenda * Minor fix in handling of extra mm7 headers 2010-11-16 P. A. Bagyenda diff --git a/mbuni/mmlib/mms_util.c b/mbuni/mmlib/mms_util.c index 51182aa..0ed1c74 100644 --- a/mbuni/mmlib/mms_util.c +++ b/mbuni/mmlib/mms_util.c @@ -49,10 +49,13 @@ int mms_load_core_settings(mCfg *cfg, mCfgGrp *cgrp) Octstr *log, *alog; Octstr *http_proxy_host; Octstr *our_interface; - long loglevel; + long loglevel = 0; if (cgrp == NULL) 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. */ 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); } - if (mms_cfg_get_int(cfg, cgrp, octstr_imm("log-level"), &loglevel) == -1) - loglevel = 0; log_set_output_level(loglevel); /* Get access log and open it. */