From: Mike Taylor Date: Thu, 20 Nov 2014 16:45:02 +0000 (+0000) Subject: Simplify _log(), since log_level no longer means what it expects. X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=b1fbc964e443ea7de39f96647233e1eb7c967c58;p=mkws-moved-to-github.git Simplify _log(), since log_level no longer means what it expects. --- diff --git a/src/mkws-core.js b/src/mkws-core.js index 176e6d7..19718e8 100644 --- a/src/mkws-core.js +++ b/src/mkws-core.js @@ -114,21 +114,7 @@ var consoleAppender = JL.createConsoleAppender('consoleAppender'); mkws.logger.setOptions({ "appenders": [consoleAppender] }); -function _log(fn, string) { - if (!mkws.log_level) - return; - - // you need to disable use strict at the top of the file!!! - if (mkws.log_level >= 3) { - // Works in Chrome; not sure about elsewhere - console.trace(); - } else if (mkws.log_level >= 2) { - - } - fn.call(mkws.logger, string); -}; - - +function _log(fn, string) { fn.call(mkws.logger, string); }; mkws.trace = function(x) { _log(mkws.logger.trace, x) }; mkws.debug = function(x) { _log(mkws.logger.debug, x) }; mkws.info = function(x) { _log(mkws.logger.info, x) };