Skip to content

Custom Logger And Extra Input #1643

Answered by dreamorosi
bcolley asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @bcolley, thank you for opening this discussion and for considering using Powertools!

Your findings are correct. At the moment the LogFormatter.formatAttributes() method only receives the standard attributes (aka the ones managed by Logger) but doesn't receive the ones you add afterwards. For reference, here you can see which fields are included in the UnformattedAttributes type.

This is a limitation of the current implementation and we have an issue (#1261) tracking it. As discussed in the issue giving access to these attributes will require a breaking change, which we are going to release in our next major release.

As part of another work stream that also involves the Logger utility,…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bcolley
Comment options

Answer selected by bcolley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants