mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-24 21:46:52 +01:00
Merge pull request #1020 from tgstation/FileLogUpdate [TGSDeploy]
File log update
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
<PropertyGroup>
|
||||
<!-- This is the authorative version list -->
|
||||
<!-- Integration tests will ensure they match across the board -->
|
||||
<TgsCoreVersion>4.2.6</TgsCoreVersion>
|
||||
<TgsCoreVersion>4.2.7</TgsCoreVersion>
|
||||
<TgsApiVersion>6.4.1</TgsApiVersion>
|
||||
<TgsClientVersion>7.0.1</TgsClientVersion>
|
||||
<TgsDmapiVersion>5.2.1</TgsDmapiVersion>
|
||||
|
||||
@@ -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<MonitorActivationReason, Task>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user