How to implement an access log with custom messages? (post_system-hook)

[eluser]christian studer[/eluser]

I have a webservice where every access is supposed to be logged to a database. How do I implement this:

- Logged are the IP, date and request URL (Not a problem).
- Additionally, the controller can decide to add a comment text to the request (Additional parameters etc.)
- Every access has to be logged, also the cached ones.
- The logging should happen after the output has been delivered to the user. In fact the http request can already be finished. Just put the data into the database, and fail silently if something is, well, failing.

I imagine I can use the post_system-hook, but how do I get the comment data out of the controller (Not applicable in the case of caching)? And is there any way I still could use the database object in the hook script?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.