Skip to content

Instantly share code, notes, and snippets.

@LarsPedersen
Created December 22, 2016 15:55
Show Gist options
  • Save LarsPedersen/4b8f3a5ccd9747776dd0ec3dd8ae2c23 to your computer and use it in GitHub Desktop.
Save LarsPedersen/4b8f3a5ccd9747776dd0ec3dd8ae2c23 to your computer and use it in GitHub Desktop.
Basic configuration for emitting Wcf trace diagnostics
<configuration>
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true">
<listeners>
<add name="rollingwcfxml" />
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging" switchValue="Information">
<listeners>
<add name="rollingwcfxml" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="rollingwcfxml" type="Essential.Diagnostics.RollingXmlTraceListener, Essential.Diagnostics" traceOutputOptions="Callstack,LogicalOperationStack,ProcessId" initializeData="C:\logs\Wcf-{DateTime:yyyyMMdd}.svclog" />
</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