-
Notifications
You must be signed in to change notification settings - Fork 429
copy_config_to_registered_loggers does not exclude source_logger by default #999
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
Labels
bug
Something isn't working
Comments
@houbie Thanks for spotting this one! I guess it would be great to write unit-test against it also to ensure we won't have regression in the future. |
6 tasks
Just merged and should be out early next week the latest with many other papercuts addressed - thank you so much @houbie ! Even more so being your first contribution :) 🎉 |
This is now released under 1.25.0 version! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When calling
copy_config_to_registered_loggers(source_logger)
without explicit exclude, the source_logger is not correctly excluded.Expected Behavior
The source_logger is excluded
Current Behavior
The source_logger name is split in letters that get all excluded
Solution
the set constructor in aws_lambda_powertools/logging/utils.py creates a set containing all the letters of the log name
exclude = set(source_logger.name)
this can be fixed with a set literal:
exclude = { source_logger.name }
The text was updated successfully, but these errors were encountered: