choo-log
choo-devtools. Thanks for passing by!
This project has been deprecated. All functionality has been merged intoDevelopment logger for choo.
Usage
var log = var choo = var app = appapp
API
logger = log(opts)
Create a new logger instance. Opts can contain:
- timing: defaults to
true
. Disable calls towindow.performance
timing API. Timing calls will not run in browsers that don't support it out of the box. - clearResourceTimings: defaults to
true
. Disable clearing the window.performance resourcetimingbuffer when full. Set tofalse
if the buffer is cleared somewhere else. - colors: defaults to the default theme of nanologger.
emitter.emit('log:<level>', msg)
Send a log event. choo-log
will pass log:<level>
events through to nanologger. For example:
emitter
These are just normal events, so you can listen to them in addition to them being logged:
emitter
localStorage.setItem('logLevel', <level>)
Set the nanologger log level, e.g.:
localStorage
Installation
$ npm install choo-log