-
-
Save modster/85f7903e3dff75b8b88c1bce7d5ca15c to your computer and use it in GitHub Desktop.
Woodlot middlewareLogger config
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 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