Merge pull request #45 from mariusbegby/pino-buffer-logging

fix: Add buffering to pino async logging
This commit is contained in:
Marius Begby authored and GitHub committed 2023-07-13 19:12:38 +02:00
commit f382c7bf28
1 file changed
+16 -9
+16 -9
View File
@@ -6,28 +6,35 @@ const transport = pino.transport({
{
target: 'pino/file',
level: process.env.MINIMUM_LOG_LEVEL,
options: { destination: './app-all.log' }
},
{
target: 'pino/file',
level: 'debug',
options: { destination: './app-debug.log' }
options: {
destination: './app-all.log',
sync: false,
minLength: 4096
}
},
{
target: 'pino/file',
level: 'info',
options: { destination: './app-info.log' }
options: {
destination: './app-info.log',
sync: false,
minLength: 4096
}
},
{
target: 'pino/file',
level: 'error',
options: { destination: './app-error.log' }
options: {
destination: './app-error.log',
sync: false
}
},
{
target: 'pino/file',
level: process.env.MINIMUM_LOG_LEVEL_CONSOLE,
options: {
colorize: true
colorize: true,
sync: false
}
}
]