Welcome Guest, Not a member yet? Register   Sign In
How to implement an access log with custom messages? (post_system-hook)
#1

[eluser]christian studer[/eluser]
Hello,

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?

Thanks,
christian




Theme © iAndrew 2016 - Forum software by © MyBB