title: console.log wrapper that keeps line numbers and supports most methods?
body: <p>How can i write a console log wrapper that:</p>
  
  <ul>
  <li>Keeping the recorded line number and file name of the log statement intact</li>
  <li>Provides access to all log severity methods (error, log, debug, ...) and shows them in the console as they where logged</li>
  <li>does provide some fallback (for example calls the log method when the browser does not support error)</li>
  <li>can be switched off in a central location, so I can switch off logging for production</li>
  <li>does handle the case that no console exists, and does not throw errors</li>
  </ul>
  
  <p>Since logging in Java Script is so inconsistent, there must be some solution. Implementing it myself is a little bit tedious, but there seems to be no good library.</p>
  
  <p>I currently found this logger that provides all the features, but it does mess up the line numbers. <a href="http://benalman.com/projects/javascript-debug-console-log/" rel="noreferrer">http://benalman.com/projects/javascript-debug-console-log/</a></p>