Setting the verbosity level of OWIN self

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.

链接地址: http://www.djcxy.com/p/95104.html

上一篇: 试图实现OWIN win认证

下一篇: 设置OWIN自我的详细程度