[eluser]falkencreative[/eluser]
Hello all. I've recently started using CodeIgniter, and like a lot of beginners (I imagine) I'm starting by writing a basic application. Basically, the site is split into two sections -- a client frontend where clients can log in and view pages specific to them, and an admin section for admin users to login and manage clients, client information, etc.
I'm looking to develop something that will keep track of recent actions by the admin. For example, I would keep a log of actions such as adding new clients, updating client information, uploading files, etc. Ideally, I will create some sort of function that will be accessible to all controllers, something along the lines of:
log($logType, $logMessage);
that would take the input and log it in the database.
Where would be the best place to put this code? Create a library and place it within the libraries folder? Create a controller for this? (I'm not sure how that would work -- I don't think that is the right way to go). Add it to the helper functions?
I'd appreciate any comments or links to applicable websites.