aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_core
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2023-09-19 16:05:51 +0100
committerGravatar Chris Lovering <[email protected]>2023-09-20 17:34:13 +0100
commita87b85230fb9131cd2ccc50031ea67ddc828bd63 (patch)
tree9a406af58c1f48f0d581f89011bfab2eb57ea89b /pydis_core
parentMerge pull request #192 from python-discord/Bump-d.py (diff)
Add log_format to the logging util to allow for standardised logging
Diffstat (limited to 'pydis_core')
-rw-r--r--pydis_core/utils/logging.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pydis_core/utils/logging.py b/pydis_core/utils/logging.py
index ecccb91a..c8eb5b19 100644
--- a/pydis_core/utils/logging.py
+++ b/pydis_core/utils/logging.py
@@ -9,6 +9,12 @@ else:
LoggerClass = logging.getLoggerClass()
TRACE_LEVEL = 5
+log_format = logging.Formatter("%(asctime)s | %(levelname)s | %(name)s | %(message)s")
+"""
+A :obj:`logging.Formatter` that can be used to standardise logging across all projects using pydis_core.
+
+:meta hide-value:
+"""
class CustomLogger(LoggerClass):