From 24c93109f0b3e79fb9ded26ae5cf00f8ecff8998 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 25 May 2020 00:16:45 -0400 Subject: [PATCH] Switch to Serilog File instead of RollingFile --- src/Tgstation.Server.Host/Core/Application.cs | 6 ++++-- src/Tgstation.Server.Host/Tgstation.Server.Host.csproj | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Tgstation.Server.Host/Core/Application.cs b/src/Tgstation.Server.Host/Core/Application.cs index 51bb634cb5..7117a95628 100644 --- a/src/Tgstation.Server.Host/Core/Application.cs +++ b/src/Tgstation.Server.Host/Core/Application.cs @@ -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 diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj index 5b9e627a09..4e7ce431c4 100644 --- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj +++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj @@ -73,7 +73,7 @@ - + all runtime; build; native; contentfiles; analyzers