Conversation
| } | ||
|
|
||
|
|
||
| builder.AppendLine(message.Trim()); |
There was a problem hiding this comment.
Why are we changing the default logic from
String line = string.Concat(
message.TrimEnd(Environment.NewLine.ToCharArray()),
Environment.NewLine);
to just
message.Trim()?
There was a problem hiding this comment.
I'm trying to remember my exact reason - it's been a while :)
The changes were based off of the ConsoleLogger implementation of scopes:
https://github.com/aspnet/Extensions/blob/master/src/Logging/Logging.Console/src/ConsoleLogger.cs
Specifically, they replace all new lines in message, not just the beginning and end. I know I encountered a need for this during testing, but I can't remember the case anymore.
What are your concerns in regards to trimming the start?
There was a problem hiding this comment.
I am unsure on why the initial code was written like that. There might have been a reason too! :) So I am just worried about touching something which we are not completely aware of. And if we can't justify this change right now, I'll prefer to revert this change. We can obviously add this change later on in some other PR, if needed.
SumoLogic.Logging.AspNetCore/SumoLogic.Logging.AspNetCore.netstandard.csproj
Outdated
Show resolved
Hide resolved
… existing clients.
Adding support for externally stored scopes & category.
Implementation based on existing BatchingLogger: https://github.com/aspnet/Extensions/blob/master/src/Logging/Logging.AzureAppServices/src/BatchingLogger.cs