WPIntell

Source evidence

How to remove E_DEPRECATED error level ?

DecaLog · support · 2024-03-26T11:46:00+00:00

mixedsentiment
mediumseverity
0.84relevance
7replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

2 / 31 rows with source links

6.5% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
challet resolved
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 ? 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. 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 ? 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… That’s a lot clearer, thank you. And so, here there is no way to tell PHP what to send to the logger ? Exactly. You’re right. 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 2 years, 3 months ago by challet . Reason: better english This reply was modified 2 years, 3 months ago by challet . Reason: better english again 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

Comments

7 shown
Pierre Lannoy 2024-03-26T12:31:00+00:00

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.

challet 2024-03-26T14:11:00+00:00

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 ?

Pierre Lannoy 2024-03-26T15:48:00+00:00

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…

challet 2024-03-26T16:19:00+00:00

That’s a lot clearer, thank you. And so, here there is no way to tell PHP what to send to the logger ?

Pierre Lannoy 2024-03-26T16:29:00+00:00

Exactly. You’re right.

challet 2024-03-27T11:39:00+00:00

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 2 years, 3 months ago by challet . Reason: better english This reply was modified 2 years, 3 months ago by challet . Reason: better english again

Pierre Lannoy 2024-04-30T16:44:00+00:00

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