Mercurial > pub > ImplabJs
view src/implab/log/listeners/console.js @ 24:f750c89976d3
Added trace tools, implab/log/trace!<channel-name>, <channel-name> is optional
author | cin |
---|---|
date | Thu, 07 Dec 2017 19:19:29 +0300 |
parents | |
children |
line wrap: on
line source
define([], function () { if (console && console.log) return function (ch, name, msg) { var args = [ch + ":"]; switch (name) { case "warn": case "error": case "log": break; default: args.push(name + ":"); name = "log"; } if (msg instanceof Array) args.push.apply(args, msg); else args.push(msg); console[name].apply(console, args); }; });