In a nutshell, I would like to keep tabs on mysqli errors. No matter where in the site...it would be great if they were written to a central log file.
I have a log file setup for php errors which works great already, but just for php errors.
php_flag log_errors on
php_value error_log pathtoerrorlog
I am using (in my php template) the following:
mysqli_report(MYSQLI_REPORT_ERROR);
This properly displays mysql errors in the code as they happen. Very nice, but I would like the option to write these to main error log as well. Is this possible?
I tried adding this line of code before mysqli_report, but it didn't help:
ini_set('log_errors',1);
Is there a way to fix this?