I am in the process of setting up user action logging for my PHP site.
Would you recommend storing them in mysql or in text/log files?
Depends on what you want to do with those, I'd say :
To not slow things down too much, you can also use both (I've used that on some websites with a bit of traffic, where it wouldn't have been wise to store data in DB immediatly) :
This way, you don't insert data in DB all the time ; and you can (provided a day or an hour has passed) do all the queries you need
I would recommend using something like Zend_Log to abstract from the actual 'physical' logging. That way you can always change backends later very easily, in case your situation changes for some reason or another.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With