Socket
Socket
Sign inDemoInstall

nanologger

Package Overview
Dependencies
0
Maintainers
27
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nanologger

Cute browser logs


Version published
Weekly downloads
58
decreased by-20.55%
Maintainers
27
Install size
8.71 kB
Created
Weekly downloads
 

Readme

Source

nanologger stability

npm version build status downloads js-standard-style

Cute browser logger.

Usage

var nanologger = require('nanologger')
var log = nanologger('my-cool-logger')

log.debug('it works!')
log.info('hey')
log.warn('oh')
log.error('oh no!')
log.fatal('send help')

API

log = logger([name][, opts])

Create a new nanologger instance. Name defaults to 'unknown'. Opts should be an object with the following properties:

  • colors: Key/value object used to set the colors of the logger. If any of the expected colors is not set, it will use the defaults, any extra color will be ignored.

level = log.logLevel

Read the current logLevel. The log level can be set through localStorage.setItem('logLevel', '<level>'). It's read once at boot time.

log.debug(message)

Emit a message at loglevel 🐛

log.info(message)

Emit a message at loglevel ✨

log.warn(message)

Emit a message at loglevel ⚠️

log.error(message)

Emit a message at loglevel 🚨

log.fatal(message)

Emit a message at loglevel 💀

See Also

License

MIT

Keywords

FAQs

Last updated on 11 Jun 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc