Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/wild-tools-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@livekit/rtc-node": patch
---

Temporarily disable pino-pretty transport
24 changes: 14 additions & 10 deletions packages/livekit-rtc/src/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,21 @@ const isProduction = process.env.NODE_ENV === 'production';

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

const devOptions: LoggerOptions = {
...defaultOptions,
transport: {
target: 'pino-pretty',
options: {
colorize: true,
},
},
};
/**
* temporarily disabling the transport option as there might be a memory leak in some corner cases related to it
* see https://github.com/pinojs/pino/issues/2370
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: Maybe also link #603 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have the backlink via this PR/squash commit, opting to leave it at that

*/
// const devOptions: LoggerOptions = {
// ...defaultOptions,
// transport: {
// target: 'pino-pretty',
// options: {
// colorize: true,
// },
// },
// };

const log = pino(isProduction ? defaultOptions : devOptions);
const log = pino(defaultOptions);
log.level = isProduction ? 'info' : 'debug';

export type LogLevel = LevelWithSilent;
Expand Down
Loading