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

by Oskman, Last updated on 4 months ago in System Administration - 9
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.
Lead Developer of PHP-Fusion
Developer Tweet: https://twitter.com/phpfusion_tweet
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.
Chris Routh
Founder of The Den of Amateur Writing

"Don't try to be a great man; just be a man and let history make its own judgments." - Riker, Star Trek The Next Generation
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.
Chris Routh
Founder of The Den of Amateur Writing

"Don't try to be a great man; just be a man and let history make its own judgments." - Riker, Star Trek The Next Generation
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
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Please read and comply with the Code of Conduct

(¯`·._.·(¯`°·._.·°º*[ Project Manager ]*º°·._.·°´¯)·._.·´¯)
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.
Users who participated in discussion: Falk, Routh, Chan, Oskman