2

I am experiencing an intermittent problem between my application, Identity Server, and the Microsoft.OWIN layer. The issue is probably something I am doing wrong, but may actually be a bug in Microsoft.OWIN. In order to better understand the root cause of the problem, I am trying to turn on logging in the OWIN layer.

I followed this post by Tugberk Ugurlu, but nothing ever gets written to the log file.

Here is my web.config file entry.

<system.diagnostics>
    <switches>
        <add name="Microsoft.Owin" value="4" />
    </switches>
    <trace autoflush="true" />
    <sharedListeners>
        <add name="file" type="System.Diagnostics.TextWriterTraceListener" initializeData="OWINtrace.log" />
    </sharedListeners>
    <sources>
        <source name="Microsoft.Owin" switchName="Microsoft.Owin" switchType="System.Diagnostics.SourceSwitch">
            <listeners>
                <add name="file" />
            </listeners>
        </source>
    </sources>
</system.diagnostics>

What am I doing wrong?

Dave Shine
  • 51
  • 4
  • Did you figure out how to do this? I'm also struggling to get some log data from my Owin app. Thanks in advance! – japhwil Dec 10 '18 at 18:17
  • The answer to this post might work for you https://stackoverflow.com/questions/28546227/can-i-enable-tracing-in-owin – ScottB Oct 01 '19 at 04:55

0 Answers0