Created
February 5, 2015 16:38
-
-
Save ninjascribble/2afc486058d8acf97ee4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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