Рефакторинг в питон код
This commit is contained in:
0
utils/__init__.py
Normal file
0
utils/__init__.py
Normal file
15
utils/log.py
Normal file
15
utils/log.py
Normal 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)],
|
||||
)
|
||||
Reference in New Issue
Block a user