Skip to content

Conversation

@justinmk3
Copy link
Contributor

Problem

Assigning a const logger = getLogger() in module scope, may default to ConsoleLogger, because modules may be loaded before logging is initialized.

Solution

Move the decision into TopicLogger, so that the time of the getLogger() assignment is irrelevant (just-in-time).


License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

Problem:
Assigning a `const logger = getLogger()` in module scope, may default to
`ConsoleLogger`, because modules may be loaded before logging is
initialized.

Solution:
Move the decision into `TopicLogger`, so that the time of the
`getLogger()` assignment is irrelevant (just-in-time).
@justinmk3 justinmk3 requested a review from a team as a code owner November 15, 2024 14:02
@github-actions

This comment was marked as resolved.

@justinmk3 justinmk3 merged commit 9eb37d2 into aws:master Nov 15, 2024
23 of 25 checks passed
@justinmk3 justinmk3 deleted the fixlogger branch November 15, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants