Skip to content

Instantly share code, notes, and snippets.

@ArunMichaelDsouza
Created April 3, 2019 09:55
Show Gist options
  • Save ArunMichaelDsouza/b7fa533951bd4547a77fe53668479c3f to your computer and use it in GitHub Desktop.
Save ArunMichaelDsouza/b7fa533951bd4547a77fe53668479c3f to your computer and use it in GitHub Desktop.
Woodlot middlewareLogger config
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'
}
}
}));
@modster
Copy link

modster commented Nov 16, 2021

Cool! 💥💥💥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment