We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58f376e commit b234e4dCopy full SHA for b234e4d
packages/logger/src/Logger.ts
@@ -1361,6 +1361,21 @@ class Logger extends Utility implements LoggerInterface {
1361
1362
this.#buffer?.delete(traceId);
1363
}
1364
+
1365
+ /**
1366
+ * Empties the buffer for the current request
1367
+ *
1368
+ */
1369
+ public clearBuffer(): void {
1370
+ const traceId = this.envVarsService.getXrayTraceId();
1371
1372
+ if (traceId === undefined) {
1373
+ return;
1374
+ }
1375
1376
+ this.#buffer?.delete(traceId);
1377
1378
1379
/**
1380
* Test if the log meets the criteria to be buffered.
1381
*
0 commit comments