Next Logger
Logging utility
Usage
var logger = require('ft-next-logger').logger;
logger.info('Saying hello');
logger.warn('Everything’s mostly cool');
logger.error('Uh-oh', { field: 'some value' });
Loggers
By default
- the
console
logger is added
- logs to
error
if NODE_ENV === test
- otherwise logger level is set by
CONSOLE_LOGGER_LEVEL
environment variable, or is set to silly
by default
- the
splunk
logger is added if NODE_ENV === production
API
logger
- the Winston objectaddConsole(level = 'info', opts = {})
removeConsole()
addSplunk(splunkUrl, level = 'info', opts = {})
removeSplunk()
clearLoggers()
Releasing
$ make release version=patch
Version also accepts minor
and major