Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 774 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 774 Bytes

logger

Universal logger for all SINFO's applications

Usage

Dev

const logger = require('logger').getLogger()

// multiple levels
logger.error('This is an error message')
logger.warn('This is a warning message')
logger.info('This is an info message')
logger.verbose('This is a verbose message')
logger.debug('This is a debug message')

// add tags
logger.info('One tag', 'myTag')
logger.info('Multiple tags', ['myTag', 'myOtherTag'])

Production

Production mode still displays on console, but just error, warn and info levels are sent to logentries

const logger = require('logger').getLogger('this-is-my-logentries-token')

// everything equal to dev mode, but now the logger will send http POST
// requests to logentries