aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/changelog.rst1
-rw-r--r--pydis_core/utils/logging.py7
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/changelog.rst b/docs/changelog.rst
index bc396366..addb5a36 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -7,6 +7,7 @@ Changelog
- :release:`10.3.0 <19th September 2023>`
- :feature:`195` Add `log_format` to `pydis_core.utils.logging` to allow for standardised logging across all services using pydis_core.
+- :feature:`195` Set `discord`, `websockets`, `chardet` & `async_rediscache` loggers to warning level and `asyncio` to info level by default.
- :release:`10.2.0 <28th August 2023>`
diff --git a/pydis_core/utils/logging.py b/pydis_core/utils/logging.py
index c8eb5b19..256151a8 100644
--- a/pydis_core/utils/logging.py
+++ b/pydis_core/utils/logging.py
@@ -55,3 +55,10 @@ def get_logger(name: str | None = None) -> CustomLogger:
logging.TRACE = TRACE_LEVEL
logging.setLoggerClass(CustomLogger)
logging.addLevelName(TRACE_LEVEL, "TRACE")
+
+get_logger("discord").setLevel(logging.WARNING)
+get_logger("websockets").setLevel(logging.WARNING)
+get_logger("chardet").setLevel(logging.WARNING)
+get_logger("async_rediscache").setLevel(logging.WARNING)
+# Set back to the default of INFO even if asyncio's debug mode is enabled.
+get_logger("asyncio").setLevel(logging.INFO)