Guest User

Untitled

a guest
Jul 17th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. foreach (var traceListener in
  2. Trace.Listeners.Cast<TraceListener>().Where(traceListener => traceListener.Name == "AzureDiagnostics"))
  3. traceListener.TraceOutputOptions = TraceOptions.DateTime | TraceOptions.Callstack | TraceOptions.LogicalOperationStack | TraceOptions.ProcessId | TraceOptions.ThreadId | TraceOptions.Timestamp;
  4.  
  5. <system.diagnostics>
  6. <trace>
  7. <listeners>
  8. <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics" traceOutputOptions="DateTime,Timestamp,Callstack,LogicalOperationStack,ProcessId,ThreadId">
  9. </add>
  10. </listeners>
  11. </trace>
  12. </system.diagnostics>
  13.  
  14. Trace.TraceInformation("Thread is sleeping for {0} seconds", CurrentThreadSleepInSeconds);
  15.  
  16. [WorkerRole.exe] Thread is sleeping for 4 seconds
Add Comment
Please, Sign In to add comment