TraceListener in OWIN Self Hosting

前端 未结 3 809
谎友^
谎友^ 2020-12-05 23:51

I am using Microsoft.Owin.Hosting to host the following, very simple web app.

Here is the call to start it:



        
3条回答
  •  醉酒成梦
    2020-12-06 00:36

    I had the same issue, I was self hosting 4 instances in one process and for each request was getting 4 lots of messages traced to console.

    I simply removed the TraceListener instance

    Trace.Listeners.Remove("HostingTraceListener")
    

    "HostingTraceListener" is defined in the owin source code so I guess could change - http://katanaproject.codeplex.com/SourceControl/latest#src/Microsoft.Owin.Hosting/Engine/HostingEngine.cs

    I did this after

    WebApp.Start(...
    

提交回复
热议问题