Created
July 12, 2016 11:23
-
-
Save alfredwesterveld/1f41edd9e475a011822d0d6fb2341269 to your computer and use it in GitHub Desktop.
json logger
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
'use strict'; | |
const timestamp = 'timestamp: "{{timestamp}}"'; | |
const title = 'title: "{{title}}"'; | |
const file = 'file: "{{file}}"'; | |
const line = 'line:"{{line}}"'; | |
const method = 'method: "{{method}}"'; | |
const message = 'message: "{{message}}"'; | |
const jsonlogger = require('tracer').console({ | |
format: `{${timestamp},${title},${file}, ${line},${method},${message}}` | |
}); | |
module.exports = jsonlogger; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment