1
0
mirror of https://github.com/Foltik/Shimapan synced 2025-03-27 05:23:40 -04:00

Add conditional http logging

This commit is contained in:
Jack Foltz 2018-08-13 06:43:31 -04:00
parent d3e72f332d
commit 76f6bbbc0d
Signed by: foltik
GPG Key ID: 303F88F996E95541
3 changed files with 4 additions and 2 deletions

View File

@ -32,6 +32,7 @@
"limit": 5 "limit": 5
}, },
"Log": { "Log": {
"http": true,
"httpLevel": "combined" "httpLevel": "combined"
} }
} }

View File

@ -10,7 +10,7 @@
"path": "uploads" "path": "uploads"
}, },
"Log": { "Log": {
"httpLevel": "dev" "http": false
}, },
"User": { "User": {
"Password": { "Password": {

View File

@ -29,6 +29,7 @@ const MongoStore = require('connect-mongo')(session);
const mongoStore = new MongoStore({url: dbHost}); const mongoStore = new MongoStore({url: dbHost});
// HTTP Request Logging // HTTP Request Logging
if (config.get('Log.http'))
app.use(morgan(config.get('Log.httpLevel'))); app.use(morgan(config.get('Log.httpLevel')));
// Session setup // Session setup