How do I enable logging and auditing in WCF?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Andrew FensterRank #983 · 2K reputationPosted May 2, 2011, 12:15 PM EDT
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.