Remove custom logging, version bump
This commit is contained in:
parent
33a80e8884
commit
00d9b4edfd
2 changed files with 2 additions and 22 deletions
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "contentmonster"
|
||||
version = "0.0.4"
|
||||
version = "0.0.5"
|
||||
authors = [
|
||||
{ name="Kumi Systems e.U.", email="office@kumi.systems" },
|
||||
]
|
||||
|
|
|
@ -1,21 +1 @@
|
|||
import logging
|
||||
import threading
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class Logger:
|
||||
@staticmethod
|
||||
def _format(message: str, severity: str) -> str:
|
||||
thread = threading.current_thread().name
|
||||
datestr = str(datetime.now())
|
||||
return f"{datestr} - {thread} - {severity} - {message}"
|
||||
|
||||
def debug(self, message: str) -> None:
|
||||
print(self.__class__()._format(message, "DEBUG"))
|
||||
|
||||
def info(self, message: str) -> None:
|
||||
print(self.__class__()._format(message, "INFO"))
|
||||
|
||||
def error(self, message: str) -> None:
|
||||
print(self.__class__()._format(message, "ERROR"))
|
||||
from logging import Logger
|
Loading…
Reference in a new issue