Control verbosity level of WP DEBUG?

I’ve been at a loss so far and so I thought I’d pose the question: Is there a way to modify the verbosity level of the WP debug.log via wp-config.php or elsewhere?

Just an fyi, here is what I have in my wp-config.php to enable logging:

///////////////////////////////////////////////////
// DEBUG

 // Enable WP_DEBUG mode
define('WP_DEBUG', true);

// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);

// Disable display of errors and warnings 
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define('SCRIPT_DEBUG', true);

// END DEBUG
/////////////////////////////////////////////////

Related posts

1 comment

  1. When WP_DEBUG is set, WordPress sets (via wp_debug_mode() call early in core load process) the error reporting level to E_ALL & ~E_DEPRECATED & ~E_STRICT. This means all warnings and errors except strict errors and PHP deprecated functions (not WordPress ones).

    You can define your own level in a custom mu-plugin (the override needs to be called as soon as possible, but after WordPress core load). Use this page for information about the error levels you can use. An example:

    error_reporting( E_ERROR | E_WARNING | E_PARSE );
    

Comments are closed.