level-logger
v2.0.0
Published
Logger for log levels
Downloads
2
Readme
Level Logger
A simple logger module wrapping the debug
module.
It generates an object containing logging functions provided through the debug
for the following log levels:
debug
info
warn
error
fatal
prefixing the module name with the corresponding <log level>:
For convenience reasons the generated object also holds a reference to console.trace
.
Installation
npm install level-logger
Usage
const log = require('level-logger')('my-module')
log.debug('debug message')
log.info('info message')
log.warn('warning message')
log.error('error message')
log.fatal('fatal message')