-
Notifications
You must be signed in to change notification settings - Fork 462
Description
Is your feature request related to a problem? Please describe.
I think it would be nice if by default, keys appended to the structure log messages with the extra=fields parameter appeared at the end of the log message rather than the beginning. That's actually the behavior shown in the sample CloudWatch logs in the documentation (https://awslabs.github.io/aws-lambda-powertools-python/latest/core/logger/), but I see the additional keys at the start of the log message when I use the extra argument. That makes it a bit harder to scroll through to find what I'm looking for in the logs.
Describe the solution you'd like
I think the default formatter could be updated for this to be the default.
Describe alternatives you've considered
I could create my own LambdaPowertoolsFormatter instance and order the keys explicitly but am hoping to avoid that and am wondering if this is the intended behavior already given how the sample logs look in the documentation.
Additional context
I'm using power tools version 1.20.2 and Python 3.8
