mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +00:00
fix: Add buffering to pino async logging
This commit is contained in:
1 parent
dc0265173e
commit
67402a8911
1 file changed
+16
-9
+16
-9
@@ -6,28 +6,35 @@ const transport = pino.transport({
|
|||||||
{
|
{
|
||||||
target: 'pino/file',
|
target: 'pino/file',
|
||||||
level: process.env.MINIMUM_LOG_LEVEL,
|
level: process.env.MINIMUM_LOG_LEVEL,
|
||||||
options: { destination: './app-all.log' }
|
options: {
|
||||||
},
|
destination: './app-all.log',
|
||||||
{
|
sync: false,
|
||||||
target: 'pino/file',
|
minLength: 4096
|
||||||
level: 'debug',
|
}
|
||||||
options: { destination: './app-debug.log' }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
target: 'pino/file',
|
target: 'pino/file',
|
||||||
level: 'info',
|
level: 'info',
|
||||||
options: { destination: './app-info.log' }
|
options: {
|
||||||
|
destination: './app-info.log',
|
||||||
|
sync: false,
|
||||||
|
minLength: 4096
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
target: 'pino/file',
|
target: 'pino/file',
|
||||||
level: 'error',
|
level: 'error',
|
||||||
options: { destination: './app-error.log' }
|
options: {
|
||||||
|
destination: './app-error.log',
|
||||||
|
sync: false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
target: 'pino/file',
|
target: 'pino/file',
|
||||||
level: process.env.MINIMUM_LOG_LEVEL_CONSOLE,
|
level: process.env.MINIMUM_LOG_LEVEL_CONSOLE,
|
||||||
options: {
|
options: {
|
||||||
colorize: true
|
colorize: true,
|
||||||
|
sync: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in new issue
Block a user