From 24c93109f0b3e79fb9ded26ae5cf00f8ecff8998 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 25 May 2020 00:16:45 -0400 Subject: [PATCH 1/3] 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 From 0bbd447c40b8468c9afcb2649bc577e3c9e28ee1 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 25 May 2020 00:17:15 -0400 Subject: [PATCH 2/3] Version bump to 4.2.7 --- build/Version.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Version.props b/build/Version.props index 6a73d95358..5018e6edbd 100644 --- a/build/Version.props +++ b/build/Version.props @@ -2,7 +2,7 @@ - 4.2.6 + 4.2.7 6.4.1 7.0.1 5.2.1 From d2ef39e4c940f081bd1edc636f69339aeb19b6c7 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 25 May 2020 00:36:35 -0400 Subject: [PATCH 3/3] Remove annoying log messages --- src/Tgstation.Server.Host/Components/Watchdog/BasicWatchdog.cs | 2 -- src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Tgstation.Server.Host/Components/Watchdog/BasicWatchdog.cs b/src/Tgstation.Server.Host/Components/Watchdog/BasicWatchdog.cs index 543800cc5d..13c96f350a 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/BasicWatchdog.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/BasicWatchdog.cs @@ -87,8 +87,6 @@ namespace Tgstation.Server.Host.Components.Watchdog if (Server == null) return null; - Logger.LogDebug("Server compile job ID is {0}", Server.Dmb.CompileJob.Id); - monitorState.ActiveServer = Server; return new Dictionary diff --git a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs index 5d9311e8de..74b3e06371 100644 --- a/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs +++ b/src/Tgstation.Server.Host/Components/Watchdog/WatchdogBase.cs @@ -664,8 +664,7 @@ namespace Tgstation.Server.Host.Components.Watchdog } } - // full reboot required - Logger.LogDebug("Next monitor action is to {0}", monitorState.NextAction); + Logger.LogTrace("Next monitor action is to {0}", monitorState.NextAction); if (monitorState.NextAction == MonitorAction.Restart) monitorState = await MonitorRestart(cancellationToken).ConfigureAwait(false); }