Рефакторинг в питон код

This commit is contained in:
2024-12-23 18:01:21 +03:00
parent fc8aefab83
commit 581530c6ec
7 changed files with 215 additions and 174 deletions

15
utils/log.py Normal file
View File

@ -0,0 +1,15 @@
import logging
from rich.logging import RichHandler
def configure_logging():
DATE_FORMAT = '[%d.%m %H:%M:%S]'
LOGGER_FORMAT = '%(asctime)s %(message)s'
logging.basicConfig(
level=logging.INFO,
format=LOGGER_FORMAT,
datefmt=DATE_FORMAT,
handlers=[RichHandler(show_time=False, rich_tracebacks=True)],
)