logger
Invisible Logging Wrapper.
Install
yarn add @invisible/logger
Usage
const logger = require('@invisible/logger')
logger.debug('This is a debug message', { meta: true })
Make sure to set LOGGER_LEVEL = silly
on your development environment.
Default Transports
Console
Will only be colorized in development.
The defaule logging level is info
, but you can use the LOGGER_LEVEL
environment variable to adjust the logging level.
Bugsnag
To use bugsnag, just define BUGSNAG_KEY
environment variable.
You can also use the BUGSNAG_LEVEL
environment variable to set the logging level.
Loggly Logger
To use Loggly, just define LOGGLY_TOKEN
and LOGGLY_SUBDOMAIN
environment variable.
You can also use the LOGGLY_LEVEL
environment variable to set the logging level.
Additional Transports
You can add an aditional transport with
const logger = require('@invisible/logger')
logger.add(winston.transports.File, { filename: 'somefile.log' })