Can the IIS logs be configured to output the name of the method called for a WCF service?
Right now the logs show only the name of the svc file.
Current log:
/myservice.svc
I would like it to show:
/myservice.svc/mymethod
IIS log files are stored by default in the %SystemDrive%\inetpub\logs\LogFiles folder of your IIS server. The folder is configured in the Directory property on the Logging page for either the server or an individual site.
IIS Log File Format IIS format records more information than NCSA Common format. The IIS format includes basic items, such as the user's IP address, user name, request date and time, service status code, and number of bytes received.
IIS logs are meant to record data from Internet Information Services, web pages, and apps. While IIS itself contributes to the scalability and flexibility of web resources, the log files contain specific statistics about the websites, user data, site visits, IPs, and queries.
Windows Communication Foundation (WCF) does not log messages by default. To activate message logging, you must add a trace listener to the System. ServiceModel. MessageLogging trace source and set attributes for the <messagelogging> element in the configuration file.
Unfortunately, there is no way to have the IIS standard logging log the method name called on a service. It only registers the page serviced.
You can however enable WCF logging to produce an svclog file that does give complete insight in method invocations and WCF service operations. For details, look at: http://msdn.microsoft.com/en-us/library/ms730064.aspx.
Might that be acceptable?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With