Q:

organize and display logs by modules on NodeJS

I am wondering if there is a way to organize and (un)activate logs on NodeJS.
Writing relevant logs takes time and comment/uncomment it is dirty and make us loose time.
I am looking for something close than the logs module, except i would like to be able to create custom kinds of logs (more than 'debug', 'info'... but according to some parts of the projects i work on, like 'authentication', 'game-engine'...) and say to node (express) which kind of logs i want to be displayed when i run it.
Do you know a module or an approach to work this way?

A:

Check out node-bunyan and winston for logging.
You can use process.env.NODE_ENV environment variable to change log level & configuration.

