View Single Post
  #1  
Old 10-31-2016, 10:12 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default 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
Reply With Quote