In short: this is the most detailed documentation on the topic (most likely..)
The only source you need.
Oh, and here is an amazing Php Error Level calculator to set up the php error mask binary code fast (if needed)
Based on this, i made my custom error reporting:
In functions.php
function error_report_log_customize(){
// error_reporting(E_ALL);
// error_reporting(E_NOTICE);
// error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_WARNING);
// helpful tool https://maximivanov.github.io/php-error-reporting-calculator/
}
add_action('init','error_report_log_customize');
In wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', 'wp-content/themes/my-theme/my-logfile.log');
define('WP_DEBUG_DISPLAY', false);
Only thing I’m not 100% sure about which hook is the best for this. init
seems working so far, but anyone with better insight, pls comment.