mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-07-19 12:04:18 +01:00
Actually enable node request logging in swarm mode
This commit is contained in:
@@ -435,7 +435,10 @@ namespace Tgstation.Server.Host.Core
|
||||
});
|
||||
|
||||
// setup the HTTP request pipeline
|
||||
// Final point where we wrap exceptions in a 500 (ErrorMessage) response
|
||||
// Add additional logging context to the request
|
||||
applicationBuilder.UseAdditionalRequestLoggingContext(swarmConfiguration);
|
||||
|
||||
// Wrap exceptions in a 500 (ErrorMessage) response
|
||||
applicationBuilder.UseServerErrorHandling();
|
||||
|
||||
// Add the X-Powered-By response header
|
||||
|
||||
@@ -14,6 +14,7 @@ using Tgstation.Server.Api.Models;
|
||||
using Tgstation.Server.Host;
|
||||
using Tgstation.Server.Host.Configuration;
|
||||
using Tgstation.Server.Host.Core;
|
||||
using Tgstation.Server.Host.Extensions;
|
||||
using Tgstation.Server.Host.Setup;
|
||||
using Tgstation.Server.Host.Utils;
|
||||
|
||||
@@ -189,7 +190,9 @@ namespace Tgstation.Server.Tests.Live
|
||||
if (firstRun)
|
||||
args[0] = string.Format(CultureInfo.InvariantCulture, "Database:DropDatabase={0}", false);
|
||||
|
||||
using (swarmNodeId != null
|
||||
var swarmMode = swarmNodeId != null;
|
||||
ApplicationBuilderExtensions.LogSwarmIdentifier = swarmMode;
|
||||
using (swarmMode
|
||||
? LogContext.PushProperty(SerilogContextHelper.SwarmIdentifierContextProperty, swarmNodeId)
|
||||
: null)
|
||||
await RealServer.Run(cancellationToken);
|
||||
|
||||
Reference in New Issue
Block a user