Reputation: 21
I'm trying to get Network Tracing to show the network traffic from my application but it's not really showing the details that the tutorial said it would. It will only show the ProcessID and TimeStamp, which I did specify I wanted but I also expected it to show more details of the HTTP request/response. I'm following the steps laid out here to:
However my output just looks like this:
System.Net Information: 0 : [17464] Current OS installation type is 'Client'.
ProcessId=7732 DateTime=2017-06-01T22:27:58.0125471Z
But missing all the cool network info that I expected from reading the Interpret Network Tracing article.
I do have trace enabled.
Here is my pretty much copy-pasta Config:
<system.diagnostics>
<sources>
<source name="System.Net" tracemode="includehex" maxdatasize="1024">
<listeners>
<add name="System.Net"/>
</listeners>
</source>
<source name="System.Net.Cache">
<listeners>
<add name="System.Net"/>
</listeners>
</source>
<source name="System.Net.Http">
<listeners>
<add name="System.Net"/>
</listeners>
</source>
<source name="System.Net.Sockets">
<listeners>
<add name="System.Net"/>
</listeners>
</source>
<source name="System.Net.WebSockets">
<listeners>
<add name="System.Net"/>
</listeners>
</source>
</sources>
<switches>
<add name="System.Net" value="Verbose"/>
<add name="System.Net.Cache" value="Verbose"/>
<add name="System.Net.Http" value="Verbose"/>
<add name="System.Net.Sockets" value="Verbose"/>
<add name="System.Net.WebSockets" value="Verbose"/>
</switches>
<sharedListeners>
<add name="System.Net"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="C:\network.log"
traceOutputOptions="ProcessId, DateTime"/>
</sharedListeners>
<trace autoflush="true"/>
</system.diagnostics>
Upvotes: 1
Views: 3307
Reputation: 180
Make sure you are not opening the file with an editor that locks it. I used Notepad++ initially, but that locked it and had the same problem as you did.
You can use Tail -f as well.
I realized it was locking it when I saw another file in the same folder with the same name except prepended a GUID to the file name and it was logging everything there: 10c57646-09e1-49e7-b8f8-84f0ce668b9bNetwork.log
Upvotes: 1