-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for scopes #85
base: master
Are you sure you want to change the base?
Conversation
} | ||
|
||
|
||
builder.AppendLine(message.Trim()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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