Skip to content

Commit 7f04bd4

Browse files
committed
Change default buffer size
1 parent a342171 commit 7f04bd4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: packages/logger/src/Logger.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class Logger extends Utility implements LoggerInterface {
188188
* Max size of the buffer. Additions to the buffer beyond this size will
189189
* cause older logs to be evicted from the buffer
190190
*/
191-
#maxBufferBytesSize = 1024;
191+
#maxBufferBytesSize = 20480;
192192

193193
/**
194194
* Contains buffered logs, grouped by _X_AMZN_TRACE_ID, each group with a max size of `maxBufferBytesSize`
@@ -1284,7 +1284,7 @@ class Logger extends Utility implements LoggerInterface {
12841284
* Flushes all items of the respective _X_AMZN_TRACE_ID within
12851285
* the buffer.
12861286
*/
1287-
flushBuffer(): void {
1287+
public flushBuffer(): void {
12881288
const traceId = this.envVarsService.getXrayTraceId();
12891289
if (traceId === undefined) {
12901290
return;

Diff for: packages/logger/src/types/Logger.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ type LogBufferOption = {
186186
enabled?: boolean;
187187

188188
/**
189-
* Maximum size in bytes of each buffer.
189+
* Maximum size of the buffer in bytes
190+
* @default `20480`
190191
*/
191192
maxBytes?: number;
192193
/**

0 commit comments

Comments
 (0)