Machinomy Logger
Machinomy logger. Works in browser and Node.
Basic usage
import Logger from '@machinomy/logger'
const LOG = new Logger('your-namespace')
LOG.info('This is info message')
LOG.warn('This is warn message')
LOG.error('This is error message')
LOG.fatal('This is fatal message')
LOG.debug('This is debug message')
LOG.trace('This is trace message')
Usage with LogDNA
import Logger from '@machinomy/logger'
const LOG = new Logger(
'your-namespace',
'LogDNA-Ingestion-Key-As-String',
{ hostname: 'another-host' }
)
LOG.info('This is info message')
LOG.warn('This is warn message')
LOG.error('This is error message')
LOG.fatal('This is fatal message')
LOG.debug('This is debug message')
LOG.trace('This is trace message')
For more LogDNA options see LogDNA for Node.js
DO NOT FORGET TO DEFINE "DEBUG=*" ENV VARIABLE!
IF YOU USE @machinomy/logger AT MULTIPLE LAYERS OF YOUR SOFTWARE - DO NOT FORGET TO DEFINE "DEBUG_DEPTH=10" ENV VARIABLE!
Web site: machinomy.com.
Twitter: @machinomy.
Support/Discussion: Gitter.
:exclamation:
Please, pay attention, this package is the part of Machinomy Lerna Monorepo and it's intended to use with other monorepo's packages.
:no_entry: You should not git clone this repository alone
:white_check_mark: You should git clone the main repository via
git clone https://github.com/machinomy/machinomy.git
or
git clone git@github.com:machinomy/machinomy.git
For documentation, usage and contributing please see Machinomy Monorepo.