JsonConsoleFormatter: keep escaped line breaks for Exceptions #83726#84972
JsonConsoleFormatter: keep escaped line breaks for Exceptions #83726#84972tarekgh merged 2 commits intodotnet:mainfrom
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
|
Tagging subscribers to this area: @dotnet/area-extensions-logging Issue DetailsFixes #83726 Linebreaks of Exceptions no longer get removed in JsonConsoleFormatter, but instead get escaped by
|
|
And we need to add a new test for this change. [Edit] |
tarekgh
left a comment
There was a problem hiding this comment.
We need to change the failed test to reflect this change.
src/libraries/Microsoft.Extensions.Logging.Console/src/JsonConsoleFormatter.cs
Show resolved
Hide resolved
This performs the escaping of the newline characters in the test case (to get a proper expected value). Wheras this is automatically handled by |
Fixes #83726
Linebreaks of Exceptions no longer get removed in JsonConsoleFormatter, but instead get escaped by
Utf8JsonWriter, so original format can be restored by log viewer.