Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Turning off php fusion error logging

My question is as the topic says. Is there a way to disable the error logging that goes into the errors table in SQL database?

Thank you in advance for any help on this!
Hi there. For your issue, we are planning to extend error logs reporting back to us as analytics and feedback system, and in the future back to us for better debugging and issue reporting. So we're not planning to turn it off anytime soon. We all need a healthy system and error engine is critical to the project.

If someone tries anything malicious with your live site, you definitely need to know what and when.

However, if you want to turn it visually off, you can comment out or remove the lines that prints out the footer errors that launches the error logs on your site.


$footer_errors = showFooterErrors();
if (!empty($footer_errors)) :
echo $footer_errors;

Note that when you do so, your site is still logging all the errors it needs to log, and you can check them in the Error Logs Administration in the Admin Panel. You can just ignore that if you're not concerned with it.

The error logs only visible to admins with Error Logs permissions and the Super Administrator account only.

If you can tell what theme are you currently using so I can point the lines to you should you need any further assistance in this matter.
Well the problem is that custom php pages get put into the database error log..which could potentially take up alot of unnecesary diskspace. Det errors are ok with me..I just don't want them in the sql database..
We need an option to turn this off. The error log is poorly coded and eats massive amounts of DB CPU logging warnings and notices. There's a reason errors should be logged to a file, especially from a middle tier. Error logs DO NOT belong in a database. This is poor programming.
For anyone who finds this, you can change the following function in includes/error_handling_include.php to get rid of DB logging and log to a file:


function setError($error_level, $error_message, $error_file, $error_line, $error_context) {
 $log_message = $error_level.':: '.$error_message.' in file '.$error_file.' on line '.$error_line;

On my site, which has been in PHP-Fusion for 16+ years, I have gotten a 1500% speed increase in page load times by getting rid of this. DB cpu usage has gone from maxing two cores to 100%, to using 15% of one core.
Very intressting and useful info. I am actually gonna make a Roadmap out of that. We can log to disc instead and read from there to the interface.

Item : https://github.com/php-fusion/PHP-Fusion/issues/2097
Thread Information
6 posts
1734 times
Last Post
Last updated on 2 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Falk, Routh, Chan, Oskman