Ability to disable or expire deprecation errors? #10049
-
We have some older projects logging lots deprecation errors to the DB, sometimes caused by our own code, more often by 1st or 3rd party code in Craft. The problem is that for some sites thousands of these errors can be logged, leading to the deprecation errors tab in the admin appearing to crash, but also clogging up requests with SQL inserts and generally just growing the whole database by dozens of megabytes of data. Is it possible to add a config setting to disable logging new deprecation errors? Or perhaps they can be made to expiry so that the Craft garbage collection will clean up older ones? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You can disable deprecation errors from return [
'components' => [
'deprecator' => [
'logTarget' => false,
],
],
]; Though I wouldn’t recommend you do that. The majority of those are going to flat out stop working when you update the site to Craft 4, so it’s imperative that you start going through and fixing them. |
Beta Was this translation helpful? Give feedback.
You can disable deprecation errors from
config/app.php
like so:Though I wouldn’t recommend you do that. The majority of those are going to flat out stop working when you update the site to Craft 4, so it’s imperative that you start going through and fixing them.