Created
June 13, 2017 20:24
-
-
Save pixelbacon/ef91528e1be8dce71bca71ccc521b76a to your computer and use it in GitHub Desktop.
Wrapper for visionmedia/debug
This file contains hidden or 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
import Debug from 'debug'; | |
Debug.enable('company.*'); | |
function createLogger(prefix){ | |
prefix = 'company.project.' + prefix; | |
return { | |
log: Debug(prefix), | |
error: Debug(prefix + '::ERROR'), | |
info: Debug(prefix + '::info'), | |
warning: Debug(prefix + '::warning'), | |
} | |
} | |
export default createLogger |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment