Skip to content
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions packages/logger/src/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class Logger extends Utility implements ClassThatLogs {
const loggerRef = this;
// Use a function() {} instead of an () => {} arrow function so that we can
// access `myClass` as `this` in a decorated `myClass.myMethod()`.
descriptor.value = (function (this: Handler, event, context, callback) {
descriptor.value = (async function (this: Handler, event, context, callback) {

let initialPersistentAttributes = {};
if (options && options.clearState === true) {
Expand All @@ -297,7 +297,7 @@ class Logger extends Utility implements ClassThatLogs {
/* eslint-disable @typescript-eslint/no-non-null-assertion */
let result: unknown;
try {
result = originalMethod!.apply(this, [ event, context, callback ]);
result = await originalMethod!.apply(this, [ event, context, callback ]);
} catch (error) {
throw error;
} finally {
Expand Down