From: Mike Taylor Date: Tue, 25 Mar 2014 11:37:49 +0000 (+0000) Subject: When the log_level setting is not provided, fall back to the old X-Git-Tag: 1.0.0~1266 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=f9fa734e832e551242392a363d913f531ea27527;p=mkws-moved-to-github.git When the log_level setting is not provided, fall back to the old "debug_level" setting for backwards compatibility. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 5c783a4..d03dcd5 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -1371,10 +1371,14 @@ function team($, teamName) { dummy: "dummy" }; - /* Set global log_level flag early so that log() works */ - if (typeof mkws_config.log_level !== 'undefined') { - mkws.log_level = mkws_config.log_level; - } else if (typeof config_default.log_level !== 'undefined') { + // Set global log_level flag early so that log() works + // Fall back to old "debug_level" setting for backwards compatibility + var tmp = mkws_config.log_level; + if (typeof(tmp) === 'undefined') tmp = mkws_config.debug_level; + + if (typeof(tmp) !== 'undefined') { + mkws.log_level = tmp; + } else if (typeof(config_default.log_level) !== 'undefined') { mkws.log_level = config_default.log_level; }