Created
April 3, 2019 09:55
-
-
Save ArunMichaelDsouza/b7fa533951bd4547a77fe53668479c3f to your computer and use it in GitHub Desktop.
Woodlot middlewareLogger config
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 express = require('express'); | |
var app = express(); | |
var woodlot = require('woodlot').middlewareLogger; | |
app.use(woodlot({ | |
streams: ['./logs/app.log'], | |
stdout: false, | |
routes: { | |
whitelist: ['/api', '/dashboard'], | |
strictChecking: false | |
}, | |
userAnalytics: { | |
platform: true, | |
country: true | |
}, | |
format: { | |
type: 'json', | |
options: { | |
cookies: true, | |
headers: true, | |
spacing: 4, | |
separator: '\n' | |
} | |
} | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool! 💥💥💥