From 23671dedd1b715eb3b24d3174530926d7cbc3b52 Mon Sep 17 00:00:00 2001 From: Michael VanOverbeek Date: Thu, 9 Mar 2017 17:52:24 +0000 Subject: [PATCH] MUD now collects diagnostics. --- ShiftOS.Server/Core.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ShiftOS.Server/Core.cs b/ShiftOS.Server/Core.cs index a602240..e14ca27 100644 --- a/ShiftOS.Server/Core.cs +++ b/ShiftOS.Server/Core.cs @@ -127,6 +127,17 @@ namespace ShiftOS.Server } + [MudRequest("diag_log", typeof(string))] + public static void Diagnostic(string guid, string line) + { + List lines = new List(); + if (File.Exists("diagnostics.log")) + lines = new List(File.ReadAllLines("diagnostics.log")); + + lines.Add(line); + File.WriteAllLines("diagnostics.log", lines.ToArray()); + } + [MudRequest("getusers", typeof(string))] public static void GetAllUsers(string guid, string contents) {