Skip to content

Instantly share code, notes, and snippets.

@nikanos
Last active October 31, 2022 20:07
Show Gist options
  • Save nikanos/b3684c455e7a6448d4bc914d01ac8028 to your computer and use it in GitHub Desktop.
Save nikanos/b3684c455e7a6448d4bc914d01ac8028 to your computer and use it in GitHub Desktop.
.NET Configuration file - network tracing
<?xml version="1.0"?>
<configuration>
<configSections>
<!-- config sections -->
</configSections>
<system.diagnostics>
<sources>
<source name="System.Net">
<listeners>
<add name="System.Net"/>
</listeners>
</source>
<source name="System.Net.Sockets">
<listeners>
<add name="System.Net"/>
</listeners>
</source>
<source name="System.Net.Cache">
<listeners>
<add name="System.Net"/>
</listeners>
</source>
</sources>
<switches>
<add name="System.Net" value="Verbose"/>
<add name="System.Net.Sockets" value="Verbose"/>
<add name="System.Net.Cache" value="Verbose"/>
</switches>
<sharedListeners>
<add name="System.Net" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\tracelogs\network_trace.log"/>
</sharedListeners>
<trace autoflush="true"/>
</system.diagnostics>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment