Closed antedeguemon closed 11 months ago
This should close #1033
This is a great find (we obviously missed :all
).
But why would we look at every single potential issue to skip issue creation if :all
is set.
Couldn't we skip the check altogether in that case?
@antedeguemon ping
Hey folks!
Sorry about the year-long delay on this pull request, life got in the middle.
I'm closing this since https://github.com/rrrene/credo/pull/1044 already fixed it. Kudos to @davorbadrov.
@antedeguemon No worries. We all have lifes outside open source, even outside the internet. ✌️
Thank you to everyone contributing to projects in their spare time. It is a real net positive ❤️
Hey folks! 🖖
Credo 1.7 was released with the MissedMetadataKeyInLoggerConfig check. The check ensures all
Logger
calls have their metadata fields defined in theconfigs.exs
- in other words, it ensures all metadata fields are really logged and no metadata field is ignored from the logs.There is a small issue with the new check:
:all
- which makes all metadata fields to be logged.The issue is that when the value is
:all
, the check crashes. 😿What this PR does?
Even though it doesn't make much sense to run
MissedMetadataKeyInLoggerConfig
check for the codebases where all metadata fields are already logged, the check is enabled by default Credo configs.So this pull request fixes the problem by skipping issues when
metadata_keys == :all
.More details
From Logger.Backends.Console documentation: