Do not continue writing after stream has closed
This commit is contained in:
parent
83593a3216
commit
b31a44aa76
2 changed files with 16 additions and 0 deletions
|
@ -112,6 +112,14 @@ export function initialize(): void {
|
|||
rotate: 3,
|
||||
});
|
||||
|
||||
stream.on('close', () => {
|
||||
globalLogger = undefined;
|
||||
});
|
||||
|
||||
stream.on('error', () => {
|
||||
globalLogger = undefined;
|
||||
});
|
||||
|
||||
globalLogger = pino(
|
||||
{
|
||||
timestamp: pino.stdTimeFunctions.isoTime,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue