WCF enable Tracing Log
在Service或Client端修改config 文件,同样的对于BizTalk WCF Adapter,修改BTSNTSvc.exe.config文件.
<system.diagnostics>
<sources>
<source name ="System.ServiceModel" switchValue="Verbose">
<listeners>
<add name="xml" />
</listeners>
</source>
<source name ="System.ServiceModel.MessageLogging"
switchValue="Verbose, ActivityTracing">
<listeners>
<add name="xml" />
</listeners>
</source>
<source name ="System.Runtime.Serialization" switchValue="Verbose">
<listeners>
<add name="xml" />
</listeners>
</source>
</sources>
<sharedListeners>
<add name="xml" type="System.Diagnostics.XmlWriterTraceListener"
traceOutputOptions="LogicalOperationStack"
initializeData="C:\log\WCFTrace.svclog" />
</sharedListeners>
<trace autoflush="true" />
</system.diagnostics>
<system.serviceModel>
<diagnostics>
<messageLogging logEntireMessage="true"
logMalformedMessages="true"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="true"
maxMessagesToLog ="1000"
maxSizeOfMessageToLog="524288"/>
</diagnostics>
........