mu-koan-logger
v1.0.2
Published
Winston logger for mu-kōän applications
Downloads
12
Readme
mu-kōän-logger 公案-ログ
npm i --save mu-koan-logger
Usage
Returns a winston.Logger
given an options.logger
property and a set
of prioritized rules.
- If
options.logger
is a string, returnswinston.loggers.get(options.logger)
. - If
options.logger
is awinston.Logger
instance, returns that same instance. - If it is neither, return winston's default logger.
const logger = require('mu-koan-logger');
/**
* Returns `winston.loggers.get('my-logger')`.
*/
var log = logger.get({ logger: 'my-logger' })
License
MIT