This package has been deprecated

Author message:

This package has been replaced by @financial-times/n-logger

ft-next-logger

4.3.1 • Public • Published

Next Logger Circle CI

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 object
  • addConsole(level = 'info', opts = {})
  • removeConsole()
  • addSplunk(splunkUrl, level = 'info', opts = {})
  • removeSplunk()
  • clearLoggers()

Releasing

$ make release version=patch

Version also accepts minor and major

Readme

Keywords

none

Package Sidebar

Install

npm i ft-next-logger

Weekly Downloads

2

Version

4.3.1

License

MIT

Last publish

Collaborators

  • financial-times
  • ftlabs
  • ironsidevsquincy
  • mattandrews