From a443c807e1ebf9e6a96e9d1f23163bfd24e6c88d Mon Sep 17 00:00:00 2001 From: Moritz Schmidt Date: Sat, 30 Sep 2017 14:43:42 +0200 Subject: [PATCH] configurable log format --- app.js | 2 +- config.js.example | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 0492190..627247b 100644 --- a/app.js +++ b/app.js @@ -19,7 +19,7 @@ setupBasicAuth(config, app) app.use(bodyParser.json()) app.use(bodyParser.urlencoded({ extended: false })) -app.use(morgan('dev')) +app.use(morgan(config.logFormat || 'dev')) app.use(serveStatic(path.join(__dirname, 'public'))) var logs = new Logs(config) diff --git a/config.js.example b/config.js.example index 56a2d0c..7c2bb1a 100644 --- a/config.js.example +++ b/config.js.example @@ -18,4 +18,5 @@ module.exports = { }, prefix: "", // Prefix to all server names suffix: "", // Suffix to all server names + logFormat: "dev", // expressjs/morgan log format };