-
Notifications
You must be signed in to change notification settings - Fork 174
fix(logger): POWERTOOLS_LOGGER_LOG_EVENT precedence is respected #1015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
6c70a0b
a034a60
0dd4568
076660c
00f5f73
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,9 +38,8 @@ const injectLambdaContext = (target: Logger | Logger[], options?: HandlerOptions | |
if (options && options.clearState === true) { | ||
persistentAttributes.push({ ...logger.getPersistentLogAttributes() }); | ||
} | ||
if (options) { | ||
logger.logEventIfEnabled(request.event, options.logEvent); | ||
} | ||
const logEvent = options ? options.hasOwnProperty('logEvent') ? options.logEvent : undefined : undefined; | ||
|
||
logger.logEventIfEnabled(request.event, logEvent); | ||
}); | ||
}; | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.