Closed sungam3r closed 8 months ago
Awesome :+1:
Thanks!
I tested this out but it doesn't work for me. Will this not work in combination with Serilog.Expressions?
EDIT: I ended up having to implement this manually, like so:
private ExpressionTemplate GetConsoleTemplate()
{
var template = "[{@l:u3}] " + GetBaseTemplateString() +
"{#if SanitizedExceptionMessage is not null}: {SanitizedExceptionMessage}{#end}\n";
var raw = !string.IsNullOrEmpty(env.GetEnvironmentVariable("NO_COLOR"));
return new ExpressionTemplate(template, theme: raw ? null : TemplateTheme.Code);
}
Again, I'm not sure if this is an issue specific to Serilog.Expressions, but this solution works for me.
👍 Serilog.Expressions has its own theming implementation
fixes #153