]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Trim access log messages to prevent double line break
authorJohan Fleury <jfleury@arcaik.net>
Mon, 5 Jul 2021 15:47:21 +0000 (11:47 -0400)
committerChocobozzz <chocobozzz@cpy.re>
Mon, 12 Jul 2021 13:40:27 +0000 (15:40 +0200)
server.ts

index 5e1f790645873d0f2a23ccfa0bd6c7f34eee544d..e46300dcef4be56974a82d84ba58bee6d27af6a9 100644 (file)
--- a/server.ts
+++ b/server.ts
@@ -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'
 }))