@elastic.io/component-logger
v0.0.1
Published
Logger for elastic.io components based on Bunyan
Downloads
2,005
Keywords
Readme
component-logger
Logger for elastic.io platform component development based on Bunyan
Example
const log = require('component-logger')();
log.info('starting up');
log.debug('things are heating up', { temperature: 80, status: { started: 'yes', overheated: 'no' } });
log.warn('getting a bit hot', { temperature: 120 });
log.error('OOOOHHH it burns!', new Error('temperature: 200'));
log.fatal('I died! Do you know what that means???');
Environment variables
|Name|Description|Values|
|----|-----------|------|
|LOG_OUTPUT_MODE| Log record view format | short
long
simple
json
bunyan
|
|LOG_LEVEL| Log Level | fatal
error
warn
info
debug
trace
|