Logging within CI 4 |
Hi all,
I am looking to begin logging the data inside my CI 4 application. I am expecting the number of users to my site to be significant enough to worry about the best way to log and store this data. I have googled about to see if i could find some best practises and get some tips on where to begin with this but couldnt find anything obvious. What would be the best practises for logging? Would i let CI Logging handle its own logging of errors to a log file? How would i handle logging for things such as failed login attempts? Would that be logged to a database instead? (say if I wanted to introduce a policy to lock accounts out if so many failures were detected) How would you handle reporting of these? would you send an email every day/week with the logs? would you build a CRUD admin section inside your app to view the logs? Any good links to resources , best practices , patterns and methodologies would be greatly appreciated too! ![]()
Depends on what you want to do with the data.
Just read it yourself (application errors): Log to file Look something specific up (user changed password): Log to database Look up temporary data (X post in Y minutes etc - anti spam): Log to database (memory table)
|
Welcome Guest, Not a member yet? Register Sign In |