Package Exports
- @financial-times/n-logger
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@financial-times/n-logger) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Next Logger 
Logging utility
Installation
npm install @financial-times/n-loggerUsage
import logger from '@financial-times/n-logger';
logger.info('Saying hello');
logger.warn('Everything’s mostly cool');
logger.error('Uh-oh', { field: 'some value' });If using CommonJS modules
const logger = require('@financial-times/n-logger').default;Loggers
By default
- the
consolelogger is added- logger level can be set by
CONSOLE_LOG_LEVELenvironment variable; defaults tosilly
- logger level can be set by
- the
splunklogger is added ifNODE_ENV === production
API
logger- the Winston objectaddConsole(level = 'info', opts = {})removeConsole()addSplunk(splunkUrl, level = 'info', opts = {})removeSplunk()clearLoggers()