Search code examples
asp.nethttpmodule

Logging in Http Module


We have created an http module to mobile detection and redirection. What the http module will do is according to the coming request it will find the device and redirect accordingly.

So here we want to log the methods in the http module. But i don't know whether it is a good practice to log all the requests? We planned to use text file logging. We have concerns about the performance since it will log all requests.

Please give your suggestions.


Solution

  • Depending on what information you want to log, all request are logged in iis. You can these log at %SystemDrive%\inetpub\logs\LogFiles. If the information is not there you can add extra information or add extra logging in the global asax. Good loggers will have minimal impact on you application. You should watch you diskspace at all time, and make a business case on what you want to do with the information.