Tracking user activities on a site

hi

i want to log all user activities - like how the system logs under the
development environment.

ie,

log which page user goes to, controller, action, parameters and so on.

i believe the best way to place your code is in the application
controller,

but other than that - i don’t know how to retrieve the parameters… sql
statements etc…

thanks