Usage
With no Heimdall Tree
var logger = require('heimdalljs-logger')('foo');
logger.trace('trace message');
logger.debug('debug message');
logger.info('info message');
logger.warn('warn message');
logger.error('error message');
console.log('app message');
DEBUG=foo DEBUG_LEVEL=trace foo
foo
DEBUG=foo DEBUG_LEVEL=warn foo
With a Heimdall Tree
var heimdall = require('heimdalljs');
var config = require('heimdalljs').configFor('logging');
config.matcher = (id) => /hai/.test(id.name);
config.depth = 2;
var logger = require('heimdalljs-logger')('foo');
heimdall.start('a');
heimdall.start('bhai');
heimdall.start('c');
heimdall.start('dhai');
logger.warn('warn message');