1
0
mirror of https://github.com/Foltik/Shimapan synced 2025-01-05 15:58:03 -05: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
},
"Log": {
"http": true,
"httpLevel": "combined"
}
}

View File

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

View File

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