Skip to content

fix(logger): warn only once on ALC log level mismatch #3816

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

Merged
merged 2 commits into from
Apr 8, 2025

Conversation

dreamorosi
Copy link
Contributor

Summary

Changes

Please provide a summary of what's being changed

This PR implements a new internal behavior for Logger that adds the ability to log a warning only once per logger instance.

Besides the new behavior described above, the PR also addresses another bug described in the linked issue which caused the Logger to not save the Advanced Logging Controls log level upon initialization, which in turns caused the warning to be emitted when log sampling was refreshed.

Please add the issue number below, if no issue is present the PR might get blocked and not be reviewed

Issue number: fixes #3815


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@boring-cyborg boring-cyborg bot added logger This item relates to the Logger Utility tests PRs that add or change tests labels Apr 8, 2025
@pull-request-size pull-request-size bot added the size/M PR between 30-99 LOC label Apr 8, 2025
@dreamorosi dreamorosi self-assigned this Apr 8, 2025
@github-actions github-actions bot added the bug Something isn't working label Apr 8, 2025
Copy link

sonarqubecloud bot commented Apr 8, 2025

@dreamorosi dreamorosi requested a review from am29d April 8, 2025 12:25
@dreamorosi dreamorosi removed the tests PRs that add or change tests label Apr 8, 2025
Copy link
Contributor

@am29d am29d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dreamorosi dreamorosi merged commit 1e330b3 into main Apr 8, 2025
42 checks passed
@dreamorosi dreamorosi deleted the fix/logger_warn_once branch April 8, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working logger This item relates to the Logger Utility size/M PR between 30-99 LOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Log pollution with the same warning on every warm execution when using injectLambdaContext middleware
2 participants