generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Labels
Description
Summary
Refactor Logging to improve message template formatting and parameter handling. It also removes extra keys extensions code and ensures consistent usage of logging methods.
currently this is how we format with extra keys
Logger.LogInformation<User>(user, "{Name} is {Age} years old",
new object[]{user.Name, user.Age});
we want to replace this with
Logger.LogInformation("{@user}", user);Why is this needed?
The following snippet should work and output correctly and not expect to be an extra key
logger.LogInformation("This is a test with {param}", "Hello");output
{
"message" : "This is a test with Hello".
"param": "Hello"
}Which area does this relate to?
No response
Solution
No response
Acknowledgment
- This request meets Powertools for AWS Lambda (.NET) Tenets
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
✅ Done