Feature request: Support of the assert of the Logging.Log
buffer when testing
#426
Open
2 tasks done
Labels
Milestone
Use case
When creating Unit Tests, I want to be able to assert if the messages have been logged on the
AWS.Lambda.Powertools.Logging.Logger
instance buffer.This will be helpful to assert in the tests the logged messages for the current logger instance, like is possible with the
Amazon.Lambda.TestUtilities
.Is it already possible in some way? And/Or does this feature request make sense?
Solution/User Experience
Currently the
Amazon.Lambda.TestUtilities
provides theTestLambdaLogger()
implementation of theILambdaLogger
that stores all the messages in a buffer and writes the messages to the console.With this helper we can assert if the message has been logged:
Creating this kind of helper can be a good way to follow for the
AWS.Lambda.Powertools.Logging.Logger
or creating a method to get the current logger instance.Alternative solutions
No response
Acknowledgment
The text was updated successfully, but these errors were encountered: