Advertisement

Posts Tagged ‘logs’

10|22

How To Tame Your PHP Error Logs

I recently watched a quick Screenr screencast by Jeffrey Way about logging your errors in PHP to a text file. Needless to say, I was a little bit inspired.

It was only a quick 5 minute tutorial so it didn’t go into much detail and after implementing it into one of my projects it needed some tweaking.

The main problem was there was the potential for your site to create thousands of indistinguishable error logs. My solution was to create folders to house daily log files. This makes your error logs live inside a nice folder structure broken down by year, month and day. Continue reading