• I am trying to use WP_Debug option to see what is going wrong on my site, but I’m having trouble restricting output to the log file…
    The wp-debug log file fills up with hundreds of notices from some stupid plugins as soon as I switch on wp_debug.
    I have tried adding an error_reporting line (E_ALL & ~E_NOTICE) to php.ini, to the wp-config.php file and to a file in mu-plugins, without any success at all.
    I have searched for ages and haven’t found an answer. Can anyone give me a detailed example that works?
    Many Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • WP debug is just doing it’s job. Normally you should get very little (if any) output. You should try and address whatever’s generating all that output.

    Thread Starter thewoosh

    (@thewoosh)

    Thanks for your response Jake but I don’t have time to debug other people’s plugins – there are about a hundred ‘NOTICE’s being generated per second.
    In the past when I have had problems with PHP code (Mostly warnings and deprecateds that PHP can honestly churn out faster than the eye can see), I have been able to cut this down to just the stuff that is actually broken, so I can fix it and get it working (usually afer a php upgrade).
    I envy you your logs – I have yet to see a production PHP environment that generates no warnings!

    So WP_DEBUG is inherently verbose, as it’s basically a way to turn on all PHP warnings, as well as some WP specific ones.

    If you don’t need the log to include these non-fatal errors and warnings, then you probably don’t need WP_DEBUG at all. You probably only need to adjust PHP’s error reporting.

    What is the issue you’re trying to debug?

    Thread Starter thewoosh

    (@thewoosh)

    Oh – Was I wrong in thinking that wp_debug is based on php’s error reporting level? I assumed it was…
    I guess it isn’t much use to me if it can’t be adjusted…
    I have a problem in that contact form 7 is not sending any emails from one site on my multisite installation (but it works on others)… Haven’t spotted anything in the logs that looked relevant and was hoping to just look at WP logs to help narrow it down…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Less verbose WP_DEBUG? HowTo (please)…’ is closed to new replies.