1
0
Fork 0

Trim access log messages to prevent double line break

This commit is contained in:
Johan Fleury 2021-07-05 11:47:21 -04:00 committed by Chocobozzz
parent 2a408c40a9
commit 943dc18254
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ morgan.token('user-agent', (req: express.Request) => {
})
app.use(morgan('combined', {
stream: {
write: (str: string) => logger.info(str, { tags: [ 'http' ] })
write: (str: string) => logger.info(str.trim(), { tags: [ 'http' ] })
},
skip: req => CONFIG.LOG.LOG_PING_REQUESTS === false && req.originalUrl === '/api/v1/ping'
}))