Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Oct 30, 2017. It is now read-only.
/choo-logPublic archive

📃 - Development logger for choo

License

NotificationsYou must be signed in to change notification settings

choojs/choo-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm versionbuild statusdownloadsjs-standard-style

This project has been deprecated. All functionality has been merged intochoo-devtools. Thanks for passing by!

Development logger forchoo.

screen capture

Usage

varlog=require('choo-log')varchoo=require('choo')varapp=choo()app.use(log())app.mount('body')

API

logger = log(opts)

Create a new logger instance. Opts can contain:

  • timing: defaults totrue. Disable calls towindow.performance timingAPI. Timing calls will not run in browsers that don't support it out of thebox.
  • clearResourceTimings: defaults totrue. Disable clearing thewindow.performance resourcetimingbuffer when full. Set tofalse ifthe buffer is cleared somewhere else.
  • colors: defaults to the default theme ofnanologger.

emitter.emit('log:<level>', msg)

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})

localStorage.setItem('logLevel', <level>)

Set thenanologger log level, e.g.:

localStorage.setItem('logLevel','debug')

Installation

$ npm install choo-log

License

MIT

About

📃 - Development logger for choo

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp