Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(logger): warn customers when the ALC log level is less verbose than log buffer #6509

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 9 commits into from
Apr 17, 2025

Conversation

anafalcao
Copy link
Contributor

@anafalcao anafalcao commented Apr 17, 2025

Issue number: #6440

Summary

When the Advanced Logging Control is less verbose than the Logger Log buffer, buffered logs will not be visible. This PR adds a warning that is emitted when this scenario is detected.

There's an existing warning message if the ALC Log Level is less verbose than the Logger Log Level.

Changes

  • Emit a warning when ALC Log level is less verbose than buffer level
  • Add a test for this behaviour

User experience

Please share what the user experience looks like before and after this change

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

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.

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 17, 2025
@github-actions github-actions bot added the bug Something isn't working label Apr 17, 2025
Copy link

codecov bot commented Apr 17, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.

Project coverage is 96.14%. Comparing base (2c4638b) to head (fe4bdcf).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
aws_lambda_powertools/logging/logger.py 66.66% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6509      +/-   ##
===========================================
- Coverage    96.16%   96.14%   -0.03%     
===========================================
  Files          243      243              
  Lines        11836    11844       +8     
  Branches       881      885       +4     
===========================================
+ Hits         11382    11387       +5     
- Misses         358      359       +1     
- Partials        96       98       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

Hey @anafalcao! Thanks a lot for this PR, please just check my comments!

@anafalcao anafalcao marked this pull request as ready for review April 17, 2025 18:18
@anafalcao anafalcao requested a review from a team as a code owner April 17, 2025 18:18
@leandrodamascena leandrodamascena merged commit 2c2d8e8 into develop Apr 17, 2025
11 of 13 checks passed
@leandrodamascena leandrodamascena deleted the loggerwarn branch April 17, 2025 19:24
leandrodamascena added a commit that referenced this pull request Apr 24, 2025
…an log buffer (#6509)

* fix(logger): warn customers when the ALC log level is less verbose than log buffer

* change flush buffer warning

* mypy

* mypy

* mypy

* fix logger

* change flush buffer warn

* check buffer config

---------

Co-authored-by: Leandro Damascena <[email protected]>
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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Log warning message if Advanced Logging Controls log level is less verbose than Logger level
2 participants