This repository was archived by the owner on Oct 30, 2017. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork10
📃 - Development logger for choo
License
NotificationsYou must be signed in to change notification settings
choojs/choo-log
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This project has been deprecated. All functionality has been merged intochoo-devtools. Thanks for passing by!
Development logger forchoo.
varlog=require('choo-log')varchoo=require('choo')varapp=choo()app.use(log())app.mount('body')
Create a new logger instance. Opts can contain:
- timing: defaults to
true
. Disable calls towindow.performance
timingAPI. Timing calls will not run in browsers that don't support it out of thebox. - clearResourceTimings: defaults to
true
. Disable clearing thewindow.performance resourcetimingbuffer when full. Set tofalse
ifthe buffer is cleared somewhere else. - colors: defaults to the default theme ofnanologger.
Send a log event.choo-log
will passlog:<level>
events through tonanologger. For example:
emitter.emit('log:info','The rain in Spain stays mainly in the plain 🌧')
These are just normal events, so you can listen to them in addition to them being logged:
emitter.on('log:debug',function(msg){// do something with debug message})
Set thenanologger log level, e.g.:
localStorage.setItem('logLevel','debug')
$ npm install choo-log
About
📃 - Development logger for choo
Resources
License
Stars
Watchers
Forks
Packages0
No packages published