I am trying to add some prefix to log output, but it doesn't play well in Chrome:
function getlog(p) {
return function() {
var mainArguments = [p].concat.call(arguments);
console.log.bind(console).apply(console, mainArguments); }
}
The simplest solution works great: console.log.bind(console) , but I want to add additional text.
Related topics:
console.log wrapper that keeps line numbers and supports most methods?