Skip to content

Instantly share code, notes, and snippets.

@tecnocrata
Last active April 30, 2020 14:30
Show Gist options
  • Select an option

  • Save tecnocrata/11661a69eaa269eeb747 to your computer and use it in GitHub Desktop.

Select an option

Save tecnocrata/11661a69eaa269eeb747 to your computer and use it in GitHub Desktop.
Enable WCF Tracing in whatever serverxxx .config file
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true" >
<listeners>
<add name="xml"/>
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging">
<listeners>
<add name="xml"/>
</listeners>
</source>
</sources>
<sharedListeners>
<add initializeData="C:\Proj\LogFiles\inControl\errors.svclog" type="System.Diagnostics.XmlWriterTraceListener" name="xml"/>
</sharedListeners>
</system.diagnostics>
<system.diagnostics>
<sources>
<source name="System.ServiceModel"
switchValue="Information, ActivityTracing"
propagateActivity="true" >
<listeners>
<add name="xml"/>
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging">
<listeners>
<add name="xml"/>
</listeners>
</source>
<source name="myUserTraceSource"
switchValue="Information, ActivityTracing">
<listeners>
<add name="xml"/>
</listeners>
</source>
</sources>
<sharedListeners>
<add name="xml"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData="C:\log.svclog" />
</sharedListeners>
</system.diagnostics>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment