This question deals with how to disable tracing for good. I would not like to disable it, but just steer its verbosity level.
Of course, by the look of the given answers for the question mention before, it seems I could setup OWIN to use a custonm ITraceOutputFactory
and then do it there. But my hope is that there is a easy built-in way to do so.
Maybe through adjusting some config file? Or is there a programmatic way?
One related way is:
private static void SetTraceLevel(HttpConfiguration config, TraceLevel level)
{
SystemDiagnosticsTraceWriter traceWriter = config.EnableSystemDiagnosticsTracing();
traceWriter.MinimumLevel = level;
}
This sets the tracing level for the Web API if you have that hosted in the OWIN.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.