I notice that message is written in raw format in log table. For example:
Hosting environment: {envName}
and in properties column is json with values
{"envName":"Development","SourceContext":"Microsoft.Hosting.Lifetime","ApplicationName":"***"}
I need to show content of this table as html table so I need some way to show complete message with place holders replaced. Is there some easy way for doing this.
Full message can be generated with something like this in sink implementation:
// _formatProvider is instance of IFormatProvider
var message = logEvent.RenderMessage(_formatProvider);
but in this implementation StringWriter is used
var logMessageString = new StringWriter(new StringBuilder());
logEvent.RenderMessage(logMessageString);