Add an optional upper bound to the size of BufferLogAppender's buffer. #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently, BufferLogAppender does not manage its internal buffer size other than exposing a clearBuffer method that consumers can use. We should add a bufferMax field (mutable) that defines the maximum number of messages that BufferLogAppender will keep in its internal buffer (discarding the oldest messages when needed).
@mahseiah_ai Can you pick this up and implement it? Let's also bump the minor version number for the package. When the PR is ready I'll review it. Once its approved and we merge, we should tag the resulting commit on
mainwith the new version number. I'll then publish it to npm.Implemented in PR #10: #10
Validation:
bun test✅bun run build✅This adds
bufferMaxtoBufferLogAppender, trims oldest buffered messages when the cap is exceeded, bumps the package version to2.4.0, and fixes the TypeScript build configuration withrootDir.Implemented in v2.5.0 (the PR from @mahseiah_ai was declined and closed).