WordPress.org

Ready to get started?Download WordPress

Forums

Error Log Dashboard Widget
[resolved] filter out PHP/WP Notices (2 posts)

  1. James Revillini
    Member
    Posted 2 years ago #

    I'd like to filter out PHP and WordPress notices and deprecated lines so I can look only at errors and warnings. I have this in wp-config:

    define('WP_DEBUG', TRUE); // false
    if (WP_DEBUG) {
      define('WP_DEBUG_LOG', true);
      define('WP_DEBUG_DISPLAY', false);
      @ini_set('display_errors',0);
      error_reporting(E_ALL^E_NOTICE);
    }

    Thoughts?

    Great plugin. Should be core in my opinion.

    http://wordpress.org/extend/plugins/error-log-dashboard-widget/

  2. Andrey "Rarst" Savchenko
    Member
    Plugin Author

    Posted 2 years ago #

    WordPress checks those constants and sets error reporting levels during load process (wp_debug_mode() call) so what you are trying to set in wp-config by error_reporting() call is overridden.

    You should make error_reporting() call later (after load process completes), try on init hook.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic