Allow logging of None type values on logging context via a config value #4524
Labels
feature-request
feature request
help wanted
Could use a second pair of eyes/hands
need-customer-feedback
Requires more customers feedback before making or revisiting a decision
Use case
The built in logging formatter provides very good defaults, however is there a potential work around to avoid stripping logging context whose value is
None
? This method call appears to remove any key value pairs on the log context whose value isNone
:powertools-lambda-python/aws_lambda_powertools/logging/formatter.py
Line 181 in e87b2b0
This would allow log messages to show context that is set to
None
which would be valuable in certain circumstances.Solution/User Experience
Allow the passing in of a keyword argument that allows
None
type values to be logged, as well as an environment variable that configures this behavior.Alternative solutions
No response
Acknowledgment
The text was updated successfully, but these errors were encountered: