Last active
November 7, 2017 02:14
-
-
Save mchelen/0609eca284d69164e683454d454f63c3 to your computer and use it in GitHub Desktop.
bunyan file log test
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
*.log | |
node_modules |
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
var bunyan = require('bunyan'); | |
var log = bunyan.createLogger({ | |
name: 'myapp', | |
streams: [ | |
{ | |
level: 'info', | |
stream: process.stdout // log INFO and above to stdout | |
}, | |
{ | |
level: 'debug', | |
path: 'debug.log' | |
} | |
] | |
}); | |
log.info('hello'); | |
log.debug('world'); | |
//prevents debug.log from being written: | |
//process.exit(); | |
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
{ | |
"name": "0609eca284d69164e683454d454f63c3", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"repository": { | |
"type": "git", | |
"url": "git+ssh://[email protected]/0609eca284d69164e683454d454f63c3.git" | |
}, | |
"author": "", | |
"license": "ISC", | |
"bugs": { | |
"url": "https://gist.github.com/0609eca284d69164e683454d454f63c3" | |
}, | |
"homepage": "https://gist.github.com/0609eca284d69164e683454d454f63c3", | |
"dependencies": { | |
"bunyan": "^1.8.12" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment