Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

choo-log

Package Overview
Dependencies
Maintainers
25
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

choo-log

Development logger for choo

  • 8.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
29
increased by52.63%
Maintainers
25
Weekly downloads
 
Created
Source

choo-log stability

npm version build status downloads js-standard-style

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

Development logger for choo.

screen capture

Usage

var log = require('choo-log')
var choo = require('choo')

var app = choo()
app.use(log())
app.mount('body')

API

logger = log(opts)

Create a new logger instance. Opts can contain:

  • timing: defaults to true. Disable calls to window.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 to false 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.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 the nanologger log level, e.g.:

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

Installation

$ npm install choo-log

License

MIT

Keywords

FAQs

Package last updated on 18 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc