using System; using System.Diagnostics; using System.Threading; using Implab.Diagnostics; using Xunit; namespace Implab.Test { using System.Threading.Tasks; using static Trace; public class UnitTest1 { [Fact] public async Task Test1() { var listener = new SimpleTraceListener(Console.Out); var source = TraceSource; source.Switch.Level = SourceLevels.All; source.Listeners.Add(listener); using (var op = LogicalOperation(nameof(Test1))) using (LogicalOperation("InnerOperation")){ await Task.Yield(); Log("Inner"); await Task.Yield(); Log("source event"); } } } }