0

This is a seemingly simple question... I was wondering if anyone knows how to turn off WP_DEBUG_LOG messages coming from a specific plugin or theme?

This assumes define('WP_DEBUG_LOG', true); in wp-config.php but its a global definition...

1 Answer 1

0

You are probably annoyed by too many DEBUG messages of unrelated plugins. The best solution I found for this was to turn on DEBUG logging only if a certain URL is matched:

if (strpos($_SERVER['QUERY_STRING'], 'page=myplugin') !== false)
   define('WP_DEBUG_LOG', true);
else
   define('WP_DEBUG_LOG', false);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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