From 4476b3a723fd0b0934b243a894fbe2e5cce97d31 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sun, 15 Jul 2018 17:43:28 -0400 Subject: [PATCH] Fix --- TGS.Server/EventID.cs | 8 ++++++++ TGS.Server/Instance/DreamDaemon.cs | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/TGS.Server/EventID.cs b/TGS.Server/EventID.cs index 9981fd199f..7f04860da9 100644 --- a/TGS.Server/EventID.cs +++ b/TGS.Server/EventID.cs @@ -331,5 +331,13 @@ namespace TGS.Server /// Warning: When a testmerge commit failed to be published /// ReferencePush = 7700, + /// + /// Warning: When the server exits unexpectedly + /// + DDServerCrash = 7800, + /// + /// Info: When the DreamDaemon process is about to be launched + /// + DDServerStart = 7800, } } diff --git a/TGS.Server/Instance/DreamDaemon.cs b/TGS.Server/Instance/DreamDaemon.cs index dff55061cc..78815061d2 100644 --- a/TGS.Server/Instance/DreamDaemon.cs +++ b/TGS.Server/Instance/DreamDaemon.cs @@ -374,9 +374,10 @@ namespace TGS.Server } } - WriteCurrentDDLog("Crash detected! Exit code: ": Proc.ExitCode); + WriteCurrentDDLog("Crash detected! Exit code: " + Proc.ExitCode); var runtimeS = (DateTime.Now - starttime).TotalSeconds; - WriteWarning("DD crashed: Exit Code: " + Proc.ExitCode + " Seconds running: " + runtimeS); + WriteWarning("DD crashed: Exit Code: " + Proc.ExitCode + " Seconds running: " + runtimeS, EventID.DDServerCrash); + lock (watchdogLock) { @@ -621,7 +622,7 @@ namespace TGS.Server { GameAPIVersion = null; //needs updating } - WriteInfo("Starting DD: " + Proc.StartInfo.FileName + " " + Proc.StartInfo.Arguments); + WriteInfo("Starting DD: " + Proc.StartInfo.FileName + " " + Proc.StartInfo.Arguments, EventID.DDServerStart); Proc.Start(); Proc.PriorityClass = ProcessPriorityClass.AboveNormal;