Skip to content

Commit 2e8c71f

Browse files
committed
remove redundant calls
1 parent 55fbc07 commit 2e8c71f

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

packages/logger/src/Logger.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,6 @@ class Logger extends Utility implements LoggerInterface {
441441
context,
442442
callback
443443
) {
444-
if (options && options.clearState === true) {
445-
loggerRef.clearState();
446-
}
447-
448444
Logger.injectLambdaContextBefore(loggerRef, event, context, options);
449445

450446
let result: unknown;

packages/logger/src/middleware/middy.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@ const injectLambdaContext = (
7070
if (isClearState) {
7171
loggers.forEach((logger: Logger) => {
7272
logger.clearState();
73-
Logger.injectLambdaContextAfterOrOnError(
74-
logger,
75-
logger.getPersistentLogAttributes(),
76-
options
77-
);
7873
});
7974
}
8075
};

0 commit comments

Comments
 (0)