Example #1
0
        private static EtwDiagnosticTrace InitializeTracing()
        {
            EtwDiagnosticTrace etwDiagnosticTrace = new EtwDiagnosticTrace("System.Runtime", EtwDiagnosticTrace.DefaultEtwProviderId);

            if (etwDiagnosticTrace.EtwProvider != null)
            {
                EtwDiagnosticTrace etwDiagnosticTrace1 = etwDiagnosticTrace;
                Action             refreshState        = etwDiagnosticTrace1.RefreshState;
                etwDiagnosticTrace1.RefreshState = (Action)Delegate.Combine(refreshState, () => Fx.UpdateLevel());
            }
            Fx.UpdateLevel(etwDiagnosticTrace);
            return(etwDiagnosticTrace);
        }
Example #2
0
        static EtwDiagnosticTrace InitializeTracing()
        {
            EtwDiagnosticTrace trace = new EtwDiagnosticTrace(defaultEventSource, EtwDiagnosticTrace.DefaultEtwProviderId);

            if (null != trace.EtwProvider)
            {
                trace.RefreshState += delegate()
                {
                    Fx.UpdateLevel();
                };
            }
            Fx.UpdateLevel(trace);
            return(trace);
        }
Example #3
0
 private static void UpdateLevel()
 {
     Fx.UpdateLevel(Fx.Trace);
 }