Skip to content
/ logger Public

Universal logger for all SINFO's applications

License

Notifications You must be signed in to change notification settings

sinfo/logger

Repository files navigation

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

About

Universal logger for all SINFO's applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published