瀏覽代碼

Use the managed thread id as identifier in our trace messages.

drieseng 9 年之前
父節點
當前提交
bd2fa5d16f
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Renci.SshNet/Abstractions/DiagnosticAbstraction.cs

+ 2 - 1
src/Renci.SshNet/Abstractions/DiagnosticAbstraction.cs

@@ -1,4 +1,5 @@
 using System.Diagnostics;
+using System.Threading;
 
 namespace Renci.SshNet.Abstractions
 {
@@ -25,7 +26,7 @@ namespace Renci.SshNet.Abstractions
         public static void Log(string text)
         {
 #if FEATURE_DIAGNOSTICS_TRACESOURCE
-            Loggging.TraceEvent(TraceEventType.Verbose, 1, text);
+            Loggging.TraceEvent(TraceEventType.Verbose, Thread.CurrentThread.ManagedThreadId, text);
 #endif // FEATURE_DIAGNOSTICS_TRACESOURCE
         }
     }