From aaad619207b871a497f493d1aca3d1f605fb1165 Mon Sep 17 00:00:00 2001 From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch> Date: Fri, 2 Mar 2018 15:02:53 +0100 Subject: [PATCH] Minor logging output changes. --- ATxCommon/FsUtils.cs | 2 +- ATxService/AutoTx.cs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ATxCommon/FsUtils.cs b/ATxCommon/FsUtils.cs index 287669f..a5ac9a2 100644 --- a/ATxCommon/FsUtils.cs +++ b/ATxCommon/FsUtils.cs @@ -271,7 +271,7 @@ namespace ATxCommon } } catch (Exception ex) { - Log.Error("Error moving directories: [{0}] > [{1}]\n{2}", + Log.Error("Error moving directories: [{0}] -> [{1}]: {2}", sourceDir.FullName, destPath, ex.Message); return false; } diff --git a/ATxService/AutoTx.cs b/ATxService/AutoTx.cs index cc45cd1..231035d 100644 --- a/ATxService/AutoTx.cs +++ b/ATxService/AutoTx.cs @@ -454,7 +454,7 @@ namespace ATxService Log.Error("Unhandled exception in OnTimedEvent(): {0}\n\n" + "Trying exponential backoff, setting timer interval to {1} ms ({3}).\n\n" + "StackTrace: {2}", ex.Message, _mainTimer.Interval, ex.StackTrace, - TimeUtils.SecondsToHuman((long)_mainTimer.Interval / 1000)); + TimeUtils.SecondsToHuman((long)_mainTimer.Interval / 1000, false)); } finally { // make sure to enable the timer again: @@ -730,12 +730,13 @@ namespace ATxService if (FsUtils.MoveAllSubDirs(userDir, targetDir)) return; - errMsg = "unable to move " + userDir.FullName; + errMsg = $"unable to move [{userDir.FullName}]"; } catch (Exception ex) { errMsg = ex.Message; } - Log.Error("MoveToManagedLocation({0}) failed: {1}", userDir.FullName, errMsg); + Log.Error("=== Moving directory [{0}] to the processing location failed: {1} ===", + userDir.FullName, errMsg); } /// <summary> -- GitLab