Improve logging
This commit is contained in:
@ -1,7 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import sys
|
||||
import typing
|
||||
from functools import lru_cache
|
||||
from pathlib import Path
|
||||
@ -15,16 +13,6 @@ if typing.TYPE_CHECKING:
|
||||
data_dir: str = user_data_dir(appname="discord_rss_bot", appauthor="TheLovinator", roaming=True, ensure_exists=True)
|
||||
|
||||
|
||||
logger: logging.Logger = logging.getLogger("discord_rss_bot")
|
||||
logger.setLevel(logging.DEBUG)
|
||||
stream_handler = logging.StreamHandler(sys.stdout)
|
||||
log_formatter = logging.Formatter(
|
||||
"%(asctime)s [%(processName)s: %(process)d] [%(threadName)s: %(thread)d] [%(levelname)s] %(name)s: %(message)s",
|
||||
)
|
||||
stream_handler.setFormatter(log_formatter)
|
||||
logger.addHandler(stream_handler)
|
||||
|
||||
|
||||
# TODO(TheLovinator): Add default things to the database and make the edible.
|
||||
default_custom_message: JSONType | str = "{{entry_title}}\n{{entry_link}}"
|
||||
default_custom_embed: dict[str, str] = {
|
||||
|
Reference in New Issue
Block a user