Error logs are only writen to when debug is on?
-
hi, Im trying to figure this out, seems like the error logs were being written to a couple of days ago…i’ve made changes to php.ini, but not log related, changed wp-config.php debug from false to true and back a couple of times…and it seems the logs in public_html/error_log and public_html/wp-admin/error_log are only writen to if i have debug true in config
I’d like to get the errors in the logs but not on my website and yes i’ve seen https://codex.www.ads-software.com/Editing_wp-config.php .
they give code examples like…Here is an example that turns php error_logging on and logs them to a specific file. If WP_DEBUG is defined to true, the errors will also be saved to this file. Just place this above any require_once or include commands.
@ini_set('log_errors','On'); @ini_set('display_errors','Off'); @ini_set('error_log','/home/example.com/logs/php_error.log'); /* That's all, stop editing! Happy blogging. */
what does “Just place this above any require_once or include commands.”
mean…do i just put it right under debug true?
- The topic ‘Error logs are only writen to when debug is on?’ is closed to new replies.