From e794bc9903e309987c3e8c02fe965b075a55b477 Mon Sep 17 00:00:00 2001 From: Yoshi Askharoun Date: Sun, 7 Jul 2024 22:46:22 -0500 Subject: [PATCH] Fix tracing --- UIX/Microsoft/Iris/Debug/Trace.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/UIX/Microsoft/Iris/Debug/Trace.cs b/UIX/Microsoft/Iris/Debug/Trace.cs index 8717180..cc2be8b 100644 --- a/UIX/Microsoft/Iris/Debug/Trace.cs +++ b/UIX/Microsoft/Iris/Debug/Trace.cs @@ -74,7 +74,7 @@ namespace Microsoft.Iris.Debug public static void WriteLine(TraceCategory cat, byte levelFlag, object valueObject) { if (IsCategoryEnabled(cat, levelFlag)) - System.Diagnostics.Debug.WriteLine(BuildLine(valueObject.ToString())); + WriteLine(BuildLine(valueObject.ToString())); } [Conditional("DEBUG")] @@ -83,7 +83,7 @@ namespace Microsoft.Iris.Debug if (IsCategoryEnabled(cat, levelFlag)) { string content = string.Format(format, param); - System.Diagnostics.Debug.WriteLine(BuildLine(content)); + WriteLine(BuildLine(content)); } } @@ -93,7 +93,7 @@ namespace Microsoft.Iris.Debug if (IsCategoryEnabled(cat, levelFlag)) { string content = string.Format(format, param1, param2); - System.Diagnostics.Debug.WriteLine(BuildLine(content)); + WriteLine(BuildLine(content)); } } @@ -103,7 +103,7 @@ namespace Microsoft.Iris.Debug if (IsCategoryEnabled(cat, levelFlag)) { string content = string.Format(format, param1, param2, param3); - System.Diagnostics.Debug.WriteLine(BuildLine(content)); + WriteLine(BuildLine(content)); } } @@ -115,8 +115,7 @@ namespace Microsoft.Iris.Debug string content = string.Format(format, pars); var line = BuildLine(content); - System.Diagnostics.Debug.WriteLine(line); - TraceSettings.Current.FireWriteCallbacks(line); + WriteLine(line); } } @@ -432,5 +431,11 @@ namespace Microsoft.Iris.Debug objArray = new object[length]; return objArray; } + + private static void WriteLine(string line) + { + System.Diagnostics.Debug.WriteLine(line); + TraceSettings.Current.FireWriteCallbacks(line); + } } } \ No newline at end of file