Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
/////////////////////////////////////////////////
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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);
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.