Configure Node.js to log to a file instead of the console

Update 2013 – This was written around Node v0.2 and v0.4; There are much better utilites now around logging. I highly recommend Winston Update Late 2013 – We still use winston, but now with a logger library to wrap the functionality around logging of custom objects and formatting. Here is a sample of our logger.js https://gist.github.com/rtgibbons/7354879 Should be as … Read more

What is console.log?

It’s not a jQuery feature but a feature for debugging purposes. You can for instance log something to the console when something happens. For instance: You’d then see #someButton was clicked in Firebug’s “Console” tab (or another tool’s console — e.g. Chrome’s Web Inspector) when you would click the button. For some reasons, the console … Read more