When a WCF call fails before the service code runs, a message trace can help narrow the problem to the transport or the service boundary. The .NET Framework 4 notes list the WCF message logging source, XML listener, and separate switches for message bodies and known PII.
Treat those settings as independent decisions. Start with headers and a synthetic request in an isolated environment. Limit the number and size of records, restrict access to the trace file, and turn tracing off after the test. A logging option that recognizes known PII cannot guarantee that application-defined fields are harmless.
What the switches control
logMessagesAtServiceLevel, logMessagesAtTransportLevel, and logMalformedMessages describe different capture points. Enable only the one you need. Configure the listener in the application’s configuration and use maxMessagesToLog and maxSizeOfMessageToLog to cap the exercise.
The machine-level enableLoggingKnownPii setting and the source-level logKnownPii setting are part of a separate opt-in policy. Keep them off for routine troubleshooting. Even then, a logged business payload can contain identifying information.
Leave a Reply