A lean logging module, in the form of an <code>EventEmitter</code> with an identical API to <code>console</code>.
A lean logging module, in the form of an
EventEmitter with an identical API to
Works in Node, or in the browser using browserify.
npm install timber
Can be used entirely in place of console - instead of logging, however, the instance will emit events based on the name of the method.
timber.log('hello', 'world') will call the
log event with
('hello', 'world') as the arguments.
logger = require('timber')
Returns a shared log instance.
Returns a clean log instance, without any listeners.
Returns a namespaced logger - creates a new one the first time, but will return the same log instance with future uses.
Listen to log calls on this instance. The event callback returns all of the arguments used with the method - handle them however you like.
A list of the supported events/methods, so you can do things like this:
var timber =// Makes timber act exactly like consoletimberEVENTS
var timber =timbertimbertimberconsoletimbertimber // warn: warning! 404