Skip to content

Commit

Permalink
Add log_format to the logging util to allow for standardised logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLovering committed Sep 20, 2023
1 parent 1309de6 commit a87b852
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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>`.

Expand Down
6 changes: 6 additions & 0 deletions pydis_core/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
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):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit a87b852

Please sign in to comment.