title: Override console.log in coffeescript
body: <p>Sometimes we leave <code>console.log</code> debug statements in our javascript.  Just so they don't accidentally make it into production (where some old browsers will die on these), we tried doing this in our first coffeescript file:</p>
  
  <pre><code>if !console?
    console = {log: -&gt;}
  </code></pre>
  
  <p>But this seems to kill all ability to use console.log in development, even in browsers that support it (webkit).</p>
  
  <p><code>console?</code> returns false, so the if block doesn't run, but it still seems to overwrite the functionality of <code>console.log</code>.</p>
  
  <p>Any ideas?  Thanks!</p>