How do I enable logging and auditing in WCF?
How do I enable logging and auditing in WCF?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Andrew FensterPosted May 2, 2011, 4:15 PM
http://msdn.microsoft.com/en-us/library/ms730064.aspx
It looks like this:
initializeData="c:\logs\messages.svclog" />
logMalformedMessages="false"
logMessagesAtServiceLevel="true"
logMessagesAtTransportLevel="false"
maxMessagesToLog="3000"
maxSizeOfMessageToLog="2000"/>
Or you can always build your own custom logger. Each time you process a call to the web service, you also call your own logger. Probably this would write a record to a database table. You would record the date, time, caller, maybe the values passed in by the caller, etc. Nothing complicated. It would take you less than a day to build. If you want to do detailed auditing, this may be the way to go.