• Resolved challet

    (@challet)


    Hello,

    When setting the loger to the INFO level, there might be many E_DEPRECATED errors showing. They disappear when changing it to NOTICE level, but the others E_INFOS are removed too.

    I’ve tried changing calling the following from an mu plugin but they are still here :

    error_reporting(E_ALL ^ E_DEPRECATED);

    Would there be a way ot get rid of them ?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Hello!

    There’s no way to filter logged events (that the way a logger works). You can filter them when you display events in services like DataDog, Loki, etc.

    If you want to get rid of all PHP events, you can go in the “listeners” tab (in settings) and uncheck PHP as source.

    Thread Starter challet

    (@challet)

    Thank you for your quick answer, I’m not sure I understand it though as I can see in the “WordPress event logger” options a “minimal level” setting. Or maybe the E_DEPRECATED level cannot be disjoined from the E_INFO ?

    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    E_DEPRECATED and E_INFO are PHP error levels.

    INFO is a standard severity level (DecaLog use these levels, not PHP ones).

    PHP E_DEPRECATED is an INFO severity level based on the 8 DecaLog levels which are, in turn, mapped onto standard severity levels.

    Note: E_INFO is a PHP error level, “INFO” is a severity level…

    Thread Starter challet

    (@challet)

    That’s a lot clearer, thank you.

    And so, here there is no way to tell PHP what to send to the logger ?

    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Exactly. You’re right.

    Thread Starter challet

    (@challet)

    I dug a bit more for my own understanding, and I that would most certainly be related to the set_error_handler function last parameter:

    […] Without this mask set the callback will be called for every error regardless to the setting of the error_reporting setting.

    Would it be conceivable to add this extra parameter in the decalog code ? Basically, it would replicate the core error_reporting value.

    • This reply was modified 8 months ago by challet. Reason: better english
    • This reply was modified 8 months ago by challet. Reason: better english again
    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Hello!

    Thank you so much for your suggestion. The PR you’ve done on Github has been merged and this feature will be released with 3.11.0 version…

    Thanks again <3

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to remove E_DEPRECATED error level ?’ is closed to new replies.