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 69b03306df..78815061d2 100644
--- a/TGS.Server/Instance/DreamDaemon.cs
+++ b/TGS.Server/Instance/DreamDaemon.cs
@@ -374,7 +374,10 @@ namespace TGS.Server
}
}
- WriteCurrentDDLog("Crash detected!");
+ WriteCurrentDDLog("Crash detected! Exit code: " + Proc.ExitCode);
+ var runtimeS = (DateTime.Now - starttime).TotalSeconds;
+ WriteWarning("DD crashed: Exit Code: " + Proc.ExitCode + " Seconds running: " + runtimeS, EventID.DDServerCrash);
+
lock (watchdogLock)
{
@@ -384,7 +387,7 @@ namespace TGS.Server
if (AwaitingShutdown == ShutdownRequestPhase.Pinged)
return;
- var BadStart = (DateTime.Now - starttime).TotalSeconds < DDBadStartTime;
+ var BadStart = runtimeS < DDBadStartTime;
if (BadStart)
{
++retries;
@@ -619,6 +622,7 @@ namespace TGS.Server
{
GameAPIVersion = null; //needs updating
}
+ WriteInfo("Starting DD: " + Proc.StartInfo.FileName + " " + Proc.StartInfo.Arguments, EventID.DDServerStart);
Proc.Start();
Proc.PriorityClass = ProcessPriorityClass.AboveNormal;