Advanced logging system - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Advanced logging system (/showthread.php?tid=47892) |
Advanced logging system - El Forum - 12-27-2011 [eluser]Unknown[/eluser] Hello In my system I have lots of tables, like companies/users etc and I need to log all events which I want to be logged. For example, if i add a new user I want to log this event, and afterwards I need to have a history. And of course I want to be able to filter that history, for example by events, and maybe... other typical functions. I think that the most simple way is to create a table and just write all the information there. But maybe it's not the best solution or maybe there is a library for such things. Btw I dont want to use standart codeigniter logger, because of the levels-system, because it writes to file (hard to get 1000 records and sort them by event or date) And also, there is a specific task: to log all logins/logouts, so that a user can watch when he entered the site and what time it was and what ip address he had. So I'm thinking about 2 tables, first "user_sessions", second is just "events", and just write to them. Is it a good way? |