Pārlūkot izejas kodu

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

drieseng 9 gadi atpakaļ
vecāks
revīzija
bd2fa5d16f

+ 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
         }
     }