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