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

Oskman - Latest reply on 21-09-2018 14:18 by Falk

0

Oskman
Oskman
Greetings!
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!

Sort replies by

0

Chan
Chan
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;
endif;


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.

0

Oskman
Oskman
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..

0

Routh
Routh
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.

0

Routh
Routh
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;
 error_log($log_message);
}


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.

0

Falk
Falk
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
Edited by Falk on 21-09-2018 14:22, 1 month ago
Actions
You can view all discussion threads in this forum.
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.
Participated Users
Users who participated in discussion: :
Falk, Routh, Chan, Oskman

Moderators:
{%user_avatar%}

Turning off php fusion error logging
by {%user_profile_link%} {%post_date%}