title: A proper wrapper for console.log with correct line number?
body: <p>I'm now developing an application, and place a global <code>isDebug</code> switch. I would like to wrap <code>console.log</code> for more convenient usage.</p>
  
  <pre><code>//isDebug controls the entire site.
  var isDebug = true;
  
  //debug.js
  function debug(msg, level){
      var Global = this;
      if(!(Global.isDebug &amp;&amp; Global.console &amp;&amp; Global.console.log)){
          return;
      }
      level = level||'info';
      Global.console.log(level + ': '+ msg);
  }
  
  //main.js
  debug('Here is a msg.');
  </code></pre>
  
  <p>Then I get this result in Firefox console.</p>
  
  <pre><code>info: Here is a msg.                       debug.js (line 8)
  </code></pre>
  
  <p>What if I want to log with line number where <code>debug()</code> gets called, like <code>info: Here is a msg.      main.js (line 2)</code>?</p>