Skip to content

Commit

Permalink
fix: prevent Loki log transport from interfering
Browse files Browse the repository at this point in the history
Graceful shutdown was disabled since it prevents the NestJS shutdown
hooks from running. Clear on error was enabled to prevent logs filling
up the memory when smth is wrong with the receiving Loki instances,
causing OOM errors.
  • Loading branch information
mKeRix committed May 23, 2021
1 parent ecec649 commit 1a4d662
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/logger.ts
Expand Up @@ -67,6 +67,8 @@ if (config.loki.enabled) {
lokiFormatter(),
winston.format.printf((info) => `${info.message}`)
),
gracefulShutdown: false,
clearOnError: true,
})
);
} catch (e) {
Expand Down

0 comments on commit 1a4d662

Please sign in to comment.