|
|
|
|
|
by ricardobeat
4647 days ago
|
|
In case anyone is looking for a debug utility, not for archival logs, look no further than http://github.com/visionmedia/debug. Named loggers, nice formatting, easy to use and you get timers for free: require('debug')('controllers:something')
debug('doing stuff', someObj)
then selectively enable it in the command-line with DEBUG=controllers:* node index.js
Express has debug built-in, so setting debug to express:* will turn on logging for it's internals. Just saying this 'cause I wish more tools came with built-in logging :) |
|