I use Catalyst (MVC framework for Perl), but the question probably apply to all MVC framework.
Until now, I used the Apache log files to get statistics about the visitors: user agent, URL accessed, time, etc. But now that I moved to an MVC framework, I don't think this is adequate. If a request to /1/foo and /1/bar are the same for me, I want to show /1/ in my log only, for example.
So I am wondering what is the best way to generate my own log files for statistics. Should I treat it as just another log file in my application?
These statistics can be logged at any time. Ideally they would be logged after the page is sent to the user, so it will not feel the additional time required for logging.