Switching to self-contained binary -

initial commit.
This commit is contained in:
SG
2025-06-06 15:36:38 +03:00
parent 5116962122
commit fc1ee27146
3 changed files with 37 additions and 32 deletions

20
logger.py Normal file
View File

@@ -0,0 +1,20 @@
import logging, sys
from config import Config
# Logging config section
LOG_TO = sys.stdout
LOG_LEVEL = logging.INFO
logger = logging.getLogger(Config.APP_NAME)
logger.setLevel(LOG_LEVEL)
stdout_handler = logging.StreamHandler(LOG_TO)
stdout_handler.setLevel(LOG_LEVEL)
formatter = logging.Formatter(
'[%(asctime)s] %(name)s: %(levelname)s: %(message)s',
datefmt='%Y-%m-%d %H:%M:%S'
)
stdout_handler.setFormatter(formatter)
if not logger.hasHandlers():
logger.addHandler(stdout_handler)
logger.propagate = False