From b1fbc964e443ea7de39f96647233e1eb7c967c58 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 20 Nov 2014 16:45:02 +0000 Subject: [PATCH] Simplify _log(), since log_level no longer means what it expects. --- src/mkws-core.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) 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) }; -- 1.7.10.4