Enabled logging to Seq.

This commit is contained in:
Casper Sparre 2025-10-08 21:32:44 +02:00
parent 849f8d7f5f
commit f3815ba993
2 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,7 @@
<PackageReference Include="Serilog" Version="4.2.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.Seq" Version="9.0.0"/>
<PackageReference Include="System.Reactive" Version="6.0.1" />
<PackageReference Include="xFFmpeg.NET" Version="7.2.0" />
</ItemGroup>

View File

@ -111,8 +111,11 @@ public class Program
levelSwitch.MinimumLevel = LogEventLevel.Error; //set initial level (until we've read from config)
Log.Logger = new LoggerConfiguration()
.Enrich.WithProperty("Application", "OF_DL")
.Enrich.WithProperty("StartTime", DateTime.Now)
.MinimumLevel.ControlledBy(levelSwitch)
.WriteTo.File("logs/OFDL.txt", rollingInterval: RollingInterval.Day)
.WriteTo.Seq("https://seq.cajetan.dk")
.CreateLogger();
AnsiConsole.Write(new FigletText("Welcome to OF-DL").Color(Color.Red));