Switch to Serilog File instead of RollingFile

This commit is contained in:
Jordan Brown
2020-05-25 00:16:45 -04:00
parent 87472e1211
commit 24c93109f0
2 changed files with 5 additions and 3 deletions
@@ -137,12 +137,14 @@ namespace Tgstation.Server.Host.Core
null);
logPath = IOManager.ConcatPath(logPath, "tgs-{Date}.log");
var rollingFileConfig = sinkConfig.RollingFile(
var rollingFileConfig = sinkConfig.File(
formatter,
logPath,
logEventLevel ?? LogEventLevel.Verbose,
50 * 1024 * 1024, // 50MB max size
flushToDiskInterval: TimeSpan.FromSeconds(2));
flushToDiskInterval: TimeSpan.FromSeconds(2),
rollingInterval: RollingInterval.Day,
rollOnFileSizeLimit: true);
});
// configure bearer token validation
@@ -73,7 +73,7 @@
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.RollingFile" Version="3.3.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>