From 96aafc9ffce3645b210d56f9120f5e62d2866d1b Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 29 Apr 2014 11:32:52 +0100 Subject: [PATCH] log() emits a stack-trace, rather than a function listing, when mkws.log_level >= 3. --- src/mkws-core.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 + ' <<<'); } -- 1.7.10.4