Skip to content

Instantly share code, notes, and snippets.

@ninjascribble
Created February 5, 2015 16:38
Show Gist options
  • Save ninjascribble/2afc486058d8acf97ee4 to your computer and use it in GitHub Desktop.
Save ninjascribble/2afc486058d8acf97ee4 to your computer and use it in GitHub Desktop.
var config = require('../../config');
var bunyan = require('bunyan');
var logger = bunyan.createLogger({
name: 'CCL',
stream: process.stdout,
level: config.get('LOG_LEVEL')
});
module.exports = {
get: function(module, opts) {
opts = opts || {};
opts.module = module;
return logger.child(opts);
}
}
var logger = require('./logging').get(__filename);
logger.debug('I\'m totally logging right now!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment