projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8fa844
)
log() emits a stack-trace, rather than a function listing, when mkws.log_level >= 3.
author
Mike Taylor
<mike@indexdata.com>
Tue, 29 Apr 2014 10:32:52 +0000
(11:32 +0100)
committer
Mike Taylor
<mike@indexdata.com>
Tue, 29 Apr 2014 10:32:52 +0000
(11:32 +0100)
src/mkws-core.js
patch
|
blob
|
history
diff --git
a/src/mkws-core.js
b/src/mkws-core.js
index
0bfc174
..
e08958f
100644
(file)
--- 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 + ' <<<');
}