Our application uses the Serilog NuGet package to write logs to Loggly, and I am using GlobalLogContext
to add a custom property like this:
using (GlobalLogContext.PushProperty("TransactionActivityId", activityId))
{
_logger.LogInformation("Test log message");
}
We also set up the logger by doing
.UseSerilog((context, loggerConfiguration) => loggerConfiguration
.ReadFrom.Configuration(context.Configuration)
.Enrich.FromGlobalLogContext())
In Loggly, I see the property in the "raw message" section, but the custom property is not showing up in the json section.
What has to be done in order for Loggly to show this property in the json section?