fix: use a serilog theme that actually works on light mode. why is this not the default
This commit is contained in:
parent
6e51eb1e1e
commit
b5e34d517a
1 changed files with 3 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ using Remora.Discord.Interactivity.Services;
|
||||||
using Remora.Rest.Core;
|
using Remora.Rest.Core;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
|
using Serilog.Sinks.SystemConsole.Themes;
|
||||||
|
|
||||||
namespace Catalogger.Backend.Extensions;
|
namespace Catalogger.Backend.Extensions;
|
||||||
|
|
||||||
|
|
@ -39,7 +40,8 @@ public static class StartupExtensions
|
||||||
.MinimumLevel.Override("Microsoft.AspNetCore.Hosting", LogEventLevel.Warning)
|
.MinimumLevel.Override("Microsoft.AspNetCore.Hosting", LogEventLevel.Warning)
|
||||||
.MinimumLevel.Override("Microsoft.AspNetCore.Mvc", LogEventLevel.Warning)
|
.MinimumLevel.Override("Microsoft.AspNetCore.Mvc", LogEventLevel.Warning)
|
||||||
.MinimumLevel.Override("Microsoft.AspNetCore.Routing", LogEventLevel.Warning)
|
.MinimumLevel.Override("Microsoft.AspNetCore.Routing", LogEventLevel.Warning)
|
||||||
.WriteTo.Console();
|
// The default theme doesn't support light mode
|
||||||
|
.WriteTo.Console(theme: AnsiConsoleTheme.Sixteen);
|
||||||
|
|
||||||
// AddSerilog doesn't seem to add an ILogger to the service collection, so add that manually.
|
// AddSerilog doesn't seem to add an ILogger to the service collection, so add that manually.
|
||||||
builder.Services.AddSerilog().AddSingleton(Log.Logger = logCfg.CreateLogger());
|
builder.Services.AddSerilog().AddSingleton(Log.Logger = logCfg.CreateLogger());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue