feat: log to seq
This commit is contained in:
parent
d221441c10
commit
ca99bdfb94
3 changed files with 11 additions and 0 deletions
|
|
@ -48,6 +48,14 @@ public static class StartupExtensions
|
|||
// The default theme doesn't support light mode
|
||||
.WriteTo.Console(theme: AnsiConsoleTheme.Sixteen);
|
||||
|
||||
if (config.Logging.SeqLogUrl != null)
|
||||
{
|
||||
logCfg.WriteTo.Seq(
|
||||
config.Logging.SeqLogUrl,
|
||||
restrictedToMinimumLevel: LogEventLevel.Verbose
|
||||
);
|
||||
}
|
||||
|
||||
// AddSerilog doesn't seem to add an ILogger to the service collection, so add that manually.
|
||||
builder.Services.AddSerilog().AddSingleton(Log.Logger = logCfg.CreateLogger());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue