Created
September 25, 2012 21:13
-
-
Save sandromello/3784489 to your computer and use it in GitHub Desktop.
Log, Trace - C#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<system.serviceModel> | |
<diagnostics> | |
<!-- Enable Message Logging here. --> | |
<!-- log all messages received or sent at the transport or service model levels > | |
<messageLogging logEntireMessage="true" | |
maxMessagesToLog="300" | |
logMessagesAtServiceLevel="true" | |
logMalformedMessages="true" | |
logMessagesAtTransportLevel="true" /> | |
</diagnostics> | |
</system.serviceModel> | |
</configuration> | |
========== | |
<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:\logs\TracingAndLogging-client.svclog" type="System.Diagnostics.XmlWriterTraceListener" | |
name="xml" /> | |
</sharedListeners> | |
<trace autoflush="true" /> | |
</system.diagnostics> | |
Source: http://msdn.microsoft.com/en-us/library/ms751526.aspx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment