Domanda

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).

È stato utile?

Soluzione

I got the below blog that explains how to add [PII] attribute to data contract, and that is what I was looking for.

http://blogs.msdn.com/b/martijnh/archive/2008/08/18/suppressing-personal-identifiable-information-pii-in-wcf-log-files.aspx

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top