Skip to content

Commit

Permalink
feature: emulator logs to file (#796)
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilien Noal <[email protected]>
  • Loading branch information
maximilien-noal authored Jul 30, 2024
1 parent a3acdb5 commit baa5fdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Spice86.Logging/LoggerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public LoggerConfiguration CreateLoggerConfiguration() {
return new LoggerConfiguration()
.Enrich.FromLogContext()
.WriteTo.Console(outputTemplate: LogFormat)
.WriteTo.Debug(outputTemplate: LogFormat);
.WriteTo.Debug(outputTemplate: LogFormat)
.WriteTo.File("logs/log-.txt", outputTemplate: LogFormat, rollingInterval: RollingInterval.Day);
}

/// <inheritdoc/>
Expand Down
1 change: 1 addition & 0 deletions src/Spice86.Logging/Spice86.Logging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<PackageReference Include="Serilog" Version="4.0.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.Debug" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="SerilogAnalyzer" Version="0.15.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit baa5fdf

Please sign in to comment.