aboutsummaryrefslogtreecommitdiffstats
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
parentMerge pull request #192 from python-discord/Bump-d.py (diff)
Add log_format to the logging util to allow for standardised logging
-rw-r--r--docs/changelog.rst4
-rw-r--r--pydis_core/utils/logging.py6
-rw-r--r--pyproject.toml2
3 files changed, 11 insertions, 1 deletions
diff --git a/docs/changelog.rst b/docs/changelog.rst
index 3a1c7bec..bc396366 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -5,6 +5,10 @@ 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.
+
+
- :release:`10.2.0 <28th August 2023>`
- :support:`192` Bump Discord.py to :literal-url:`2.3.2 <https://github.com/Rapptz/discord.py/releases/tag/v2.3.2>`.
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):
diff --git a/pyproject.toml b/pyproject.toml
index 95dcb65c..5f7a9501 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pydis_core"
-version = "10.2.0"
+version = "10.3.0"
description = "PyDis core provides core functionality and utility to the bots of the Python Discord community."
authors = ["Python Discord <[email protected]>"]
license = "MIT"