configurable log format

This commit is contained in:
Moritz Schmidt 2017-09-30 14:43:42 +02:00 committed by Björn Dahlgren
parent 9326ee4c73
commit a443c807e1
2 changed files with 2 additions and 1 deletions

2
app.js
View File

@ -19,7 +19,7 @@ setupBasicAuth(config, app)
app.use(bodyParser.json()) app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: false })) app.use(bodyParser.urlencoded({ extended: false }))
app.use(morgan('dev')) app.use(morgan(config.logFormat || 'dev'))
app.use(serveStatic(path.join(__dirname, 'public'))) app.use(serveStatic(path.join(__dirname, 'public')))
var logs = new Logs(config) var logs = new Logs(config)

View File

@ -18,4 +18,5 @@ module.exports = {
}, },
prefix: "", // Prefix to all server names prefix: "", // Prefix to all server names
suffix: "", // Suffix to all server names suffix: "", // Suffix to all server names
logFormat: "dev", // expressjs/morgan log format
}; };