From 8967943abc48ab025e9b209b4002d0b5b6d82943 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 18 Aug 2018 03:28:55 -0400 Subject: [PATCH] Better CommsContext logging --- .../Components/Interop/CommContext.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Tgstation.Server.Host/Components/Interop/CommContext.cs b/src/Tgstation.Server.Host/Components/Interop/CommContext.cs index 515c30a882..f43bab84be 100644 --- a/src/Tgstation.Server.Host/Components/Interop/CommContext.cs +++ b/src/Tgstation.Server.Host/Components/Interop/CommContext.cs @@ -88,12 +88,13 @@ namespace Tgstation.Server.Host.Components.Interop /// The async void HandleWrite(object sender, FileSystemEventArgs e) //this is what async void was made for { - logger.LogTrace("FileSystemWatcher triggered..."); try { var fileBytes = await ioManager.ReadAllBytes(e.FullPath, cancellationToken).ConfigureAwait(false); var file = Encoding.UTF8.GetString(fileBytes); + logger.LogTrace("Read interop command json: {0}", file); + CommCommand command; try { @@ -105,7 +106,7 @@ namespace Tgstation.Server.Host.Components.Interop catch (JsonSerializationException ex) { //file not fully written yet - logger.LogTrace("Suppressing json convert exception: {0}", ex); + logger.LogDebug("Suppressing json convert exception for command file write: {0}", ex); return; } @@ -113,7 +114,7 @@ namespace Tgstation.Server.Host.Components.Interop } catch (Exception ex) { - logger.LogDebug("Exception while trying to read command json: {0}", ex); + logger.LogDebug("Exception while trying to handle command json write: {0}", ex); } }