From: Mike Taylor Date: Tue, 29 Apr 2014 10:32:52 +0000 (+0100) Subject: log() emits a stack-trace, rather than a function listing, when mkws.log_level >= 3. X-Git-Tag: 1.0.0~818 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=96aafc9ffce3645b210d56f9120f5e62d2866d1b log() emits a stack-trace, rather than a function listing, when mkws.log_level >= 3. --- diff --git a/src/mkws-core.js b/src/mkws-core.js index 0bfc174..e08958f 100644 --- a/src/mkws-core.js +++ b/src/mkws-core.js @@ -88,7 +88,8 @@ mkws.log = function(string) { // you need to disable use strict at the top of the file!!! if (mkws.log_level >= 3) { - console.log(arguments.callee.caller); + // Works in Chrome; not sure about elsewhere + console.trace(); } else if (mkws.log_level >= 2) { console.log(">>> called from function " + arguments.callee.caller.name + ' <<<'); }