.NET tracing not working with Diagnostics.TraceSource, only Diagnostics.Trace

前端 未结 1 1250
萌比男神i
萌比男神i 2021-01-18 04:38

I’m trying to set up .NET tracing. I’m able to get basic tracing to work via System.Diagnostics.Trace, but for complicated reasons I have to activate tracing via System.Dia

1条回答
  •  一向
    一向 (楼主)
    2021-01-18 05:15

    change switchName="mySwitch" to switchValue="Verbose". This then outputs ALL traces via tracesource. You can change the switchLevel to increase / reduce the verbosity of the tracing. In your sample you have traced an information message, there is, verbose, information, warnings, error, critical. Set switch to warning and you won't get any verbose or information messages.

    0 讨论(0)
提交回复
热议问题