2.0.1 • Published 8 years ago

mangabi-logger v2.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

Mangabi Logger

WinstonJS logger with defaults defaults set for use by Mangabi.com

Installation

var logger = require('mangabi-logger')

Upgrading from version 1.0 to 2.0

In version 2 the default log level names have been changed to match the syslog levels in specified in RFC5424. All logging statments should be changed, but specifically silly, verbose, warn, and fatal no longer exist on the logger object.

Defaults

Colors

logger.debug('Blue')

logger.info('Green')

logger.notice('Green')

logger.warning('Yellow')

logger.error('Yellow')

logger.crit('Magenta')

logger.alert('Magenta')

logger.emerg('Red')

Transports

Development

  • Console Transport with color and pretty-printing. LOG_LEVEL defaults to debug

Test

  • No logging unless LOG_LEVEL is set. If LOG_LEVEL is set then dev logging will be used

Production and Stage

  • Console Transport with timestamp and exception handling. LOG_LEVEL defaults to info

Customization

  • LOG_LEVEL environment variable can be set to debug, info, notice, warning, error, crit, alert, or emerg. Any logs below this level will be ignored.
  • NODE_ENV will determine which transports are used.
2.0.1

8 years ago

2.0.0

8 years ago

1.0.0

9 years ago