You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indeed you can't have both, but that's how the Serilog.Sinks.Console package works. This is not related to this Serilog.Settings.Configuration package.
If you write it programmatically you can configure either the theme:
configuration.WriteTo.Console(formatter:new ExpressionTemplate("[{@t:HH:mm:ss}{#if CorrelationId is not null} {Substring(CorrelationId, 0,5)}{#end} {@l:u3}] {#if SourceContext is not null}{SourceContext}{#end}{@m}\n{@x}"));
But you can't have both, this does not even compile:
configuration.WriteTo.Console(
theme: AnsiConsoleTheme.Literate,
formatter:new ExpressionTemplate("[{@t:HH:mm:ss}{#if CorrelationId is not null} {Substring(CorrelationId, 0,5)}{#end} {@l:u3}] {#if SourceContext is not null}{SourceContext}{#end}{@m}\n{@x}"));
If I remove commented out theme definition, the formatter will no longer be used, only theme will be finally configured.
We can't have both.
The text was updated successfully, but these errors were encountered: