Skip to content

Commit 28fc1b2

Browse files
authored
Temporarily disable pino-pretty transport (#604)
* Temporarily disable pino-pretty transport * Create wild-tools-complain.md
1 parent 58d50f5 commit 28fc1b2

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

.changeset/wild-tools-complain.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@livekit/rtc-node": patch
3+
---
4+
5+
Temporarily disable pino-pretty transport

packages/livekit-rtc/src/log.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,21 @@ const isProduction = process.env.NODE_ENV === 'production';
88

99
const defaultOptions: LoggerOptions = { name: 'lk-rtc' };
1010

11-
const devOptions: LoggerOptions = {
12-
...defaultOptions,
13-
transport: {
14-
target: 'pino-pretty',
15-
options: {
16-
colorize: true,
17-
},
18-
},
19-
};
11+
/**
12+
* temporarily disabling the transport option as there might be a memory leak in some corner cases related to it
13+
* see https://github.com/pinojs/pino/issues/2370
14+
*/
15+
// const devOptions: LoggerOptions = {
16+
// ...defaultOptions,
17+
// transport: {
18+
// target: 'pino-pretty',
19+
// options: {
20+
// colorize: true,
21+
// },
22+
// },
23+
// };
2024

21-
const log = pino(isProduction ? defaultOptions : devOptions);
25+
const log = pino(defaultOptions);
2226
log.level = isProduction ? 'info' : 'debug';
2327

2428
export type LogLevel = LevelWithSilent;

0 commit comments

Comments
 (0)