I can't find the right way to make it work. I tried many things, like putting this in wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', 'wp-content/themes/mytheme/mylog.log' ); // yeah, customized it a bit. It logs everything
ini_set('error_reporting', E_ERROR );
also tried to set it in the php.ini on various websites i manage. Not on managed hosting. Or at least not on the well known international ones. Can it be server side or syntax error, or not even possible what i want?
Thanks!
I can't find the right way to make it work. I tried many things, like putting this in wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', 'wp-content/themes/mytheme/mylog.log' ); // yeah, customized it a bit. It logs everything
ini_set('error_reporting', E_ERROR );
also tried to set it in the php.ini on various websites i manage. Not on managed hosting. Or at least not on the well known international ones. Can it be server side or syntax error, or not even possible what i want?
Thanks!
In short: this is the most detailed documentation on the topic (most likely)
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 & ~E_DEPRECATED & ~E_NOTICE & ~E_WARNING);
}
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.