Follow

How Can I Turn On HTTP Tracing For HTTP Logging?

NormShield agents operate as modular scanners and sometimes for debugging it is necessary to log raw HTTP(S) requests that these scanners produce. .NET's Tracing can be used for this purpose declaratively.

The scanner's, whose HTTP requests/responses wanted to be logged, config file should be edited to include the following configuration piece inside the <configuration> element.

When the logging wanted to be disabled switchValue="Off" attribute should be added to <source name="System.Net" trace source.

<system.diagnostics>
   <trace autoflush="true" />
   <sources>
      <source name="System.Net" maxdatasize="1024">
        <listeners>
           <add name="MyTraceFile"/>
        </listeners>
     </source>
  </sources>
  <sharedListeners>
     <add
        name="MyTraceFile"
        type="System.Diagnostics.TextWriterTraceListener"
        initializeData="System.Net.trace.log" />
  </sharedListeners>
  <switches>
     <add name="System.Net" value="Verbose" />
  </switches>
</system.diagnostics>

The log file produced will be formed under directory with name System.Net.trace.log.

C:\Program Files (x86)\NormShield\Agent\Binary

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk