In web2py, is there a way to have a piece of common code be executed before all controllers are called? For example, I want to add some code that will log client IPs to a log of requests to enable analysis. I could simply make the first line of all my controllers be something like response = RequestBase(request)
but I'm curious to know if this is a problem that's already been solved through some other mecanisms. In the same breath, I'm curious to know if other MVC frameworks have found any interesting ways of dealing with this.
Thank you
Mark