-
Notifications
You must be signed in to change notification settings - Fork 41
Description
Greetings,
I implemented the message formatter function as described on this page:
https://github.com/SumoLogic/sumologic-net-appenders/blob/master/docs/sumologic.logging.aspnetcore.md
However, when logging using the .NET Core Log message template format the "properties" dictionary passed into the message formatter function does not contain any of the properties.
For example when calling the logger like this:
_logger.LogCritical("This is a test! {dateTimeUtc}, {testProperty}",DateTime.UtcNow.ToString("u"),"Test property");
I expected the properties dictionary to contain dateTimeUtc and testProperty with their corresponding values. However, when stepping through the debugger the message formatter function does not contain any properties.
The resulting output logged into sumologic looks like this:
{
"date":"2020-09-02 20:41:35.925 +00:00",
"message":"This is a test! 2020-09-02 20:41:35Z, Test property",
"level":"Critical",
"category":"PI.Core.API.Controllers.StrategySurveysController"
}
Can you confirm that this is a bug or let me know if I missed something?
Your assistance is greatly appreciated
Thank you