pulp / pulpcore

Pulp 3 pulpcore package https://pypi.org/project/pulpcore/
GNU General Public License v2.0
284 stars 111 forks source link

Document how to silence the deprecation warnings #3254

Open bmbouter opened 1 year ago

bmbouter commented 1 year ago

Some users may not want to see the deprecation warnings. Here's a diff that is applied directly to the settings file on how to disable them.

diff --git a/pulpcore/app/settings.py b/pulpcore/app/settings.py
index 422beb796..32278f4a6 100644
--- a/pulpcore/app/settings.py
+++ b/pulpcore/app/settings.py
@@ -229,6 +229,11 @@ LOGGING = {
             "level": "WARNING",
             "propagate": False,
         },
+        "pulpcore.deprecation": {
+            "handlers": ["console"],
+            "level": "ERROR",
+            "propagate": False,
+        }
     },
 }

We should document a "dynaconf specified" approach that our users could apply without having to modify the settings.py file directly (which they should never do).

ipanova commented 1 year ago

we already specify how to enable debug log level https://github.com/pulp/pulpcore/blob/main/docs/troubleshooting.rst#enabling-debug-logging we can expand the docs here