To log known Personally identifiable information in windows one can configure machine.config file as below...
<configuration>
<system.serviceModel>
<machineSettings enableLoggingKnownPii="true" />
</system.serviceModel>
</configuration>
And in WCF configuration file configuration is required as below
<configuration>
<system.diagnostics>
<sources>
<source name="System.ServiceModel.MessageLogging" logKnownPii="true">
<listeners>
...
</listeners>
</source>
<source name="System.ServiceModel" switchValue="Verbose, ActivityTracing">
<listeners>
...
</listeners>
</source>
</sources>
</system.diagnostics>
</configuration>
Now the question is when the logKnownPii=false what all information will not be logged or in other way what all information logs I can see in log files after turning the setting ON (logKnownPii=true).
I got the below blog that explains how to add [PII] attribute to data contract, and that is what I was looking for.