-
Notifications
You must be signed in to change notification settings - Fork 402
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
feat(logger): add use_rfc3339 and auto-complete formatter opts in Logger #1662
feat(logger): add use_rfc3339 and auto-complete formatter opts in Logger #1662
Conversation
@leandrodamascena need your review as this must be included in today's release |
Codecov ReportBase: 99.35% // Head: 99.35% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #1662 +/- ##
========================================
Coverage 99.35% 99.35%
========================================
Files 128 128
Lines 5908 5917 +9
Branches 373 375 +2
========================================
+ Hits 5870 5879 +9
Misses 18 18
Partials 20 20
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @heitorlessa! I tested it locally and it's working as expected!
I just made a comment, but if you don't agree with that I think this PR is read to merge.
Addressed your feedback and shorten to |
Docs done - @leandrodamascena if you approve, feel free to merge. |
Amazing @heitorlessa! |
Question on the usage of this, if I set |
Nope it should just work, as a child logger will use the parent Logger
formatter.
I’ve also updated docs on Child Loggers that unless you truly need an
explicit child Logger, you can use a Logger() if POWERTOOLS_SERVICE_NAME is
set (Logger(service=service) otherwise)
…On Mon, 31 Oct 2022 at 19:46, Justin Plock ***@***.***> wrote:
Question on the usage of this, if I set use_rfc3339=True in the main
Logger, and then reference another logger in another file with
Logger(child=True), do I also have to set use_rfc3339=True in the child
loggers?
—
Reply to this email directly, view it on GitHub
<#1662 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZPQBBUE5B5XBDIYLT6VN3WGAHZLANCNFSM6AAAAAARQJFQYA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Issue number: #946
Summary
This makes it easier to use a compatible date format with RFC3339 and ISO8601:
2022-10-27T16:27:43.738+02:00
Changes
User experience
You can now simply use
use_rfc3339
flag to enable itThis PR also raised a suboptimal UX we had on propagating
LambdaPowertoolsFormatter
options inLogger
askwargs
. When implementing this feature, it made it difficult to remember the entire param. For this reason, this PR exposes all of them withinLogger
constructor, so that:Logger(utc=, ...)
autocompletes.Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
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.