X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Code Change to Stop Logging Notices (https://forum.x-cart.com/showthread.php?t=74602)

Jon 10-31-2016 10:12 AM

Code Change to Stop Logging Notices
 
Notices in X-Cart 4's var/log folder bloat the logs unnecessarily. I tried turning them off in the config.php, in .htaccess, and even at the entire server level, and x-cart kept logging them.

Drove me nuts.

The solution is as follows:

Open include/func/func.logging.php

FIND:

Code:

/**
 * Error handler
 */
function func_error_handler($errno, $errstr, $errfile, $errline)
{


AFTER ADD:

Code:

        // SD - Don't Log Notices
        if (in_array($errno, array(1, 3, 8, 9, 10)))
                return;
        // / SD - Don't Log Notices


You're welcome :)


All times are GMT -8. The time now is 09:29 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.