Is it possible to bind a date/time to a console log?
I have the following code: var myLog = console.log.bind(console, '[DEBUG]'); Which works find when I want to log things prepended with [DEBUG] to the console. Now I want to add a date/time to the log and I tried this: var myLog = console.log.bind(console, '[DEBUG ' + (new Date) + ']'); Which obviously does not work because it always logs the same time (the time that the .bind was called). Is there any way (using .bind ) to log the current time on each log without having to do this: var myLog = function(){ var args = ['[DEBUG ' + (new Date) + ']']; for(var i = 0; i < arguments.length; ++i) {