1
0

better loggings but i need to fix a duplicate log line error

This commit is contained in:
andrea
2025-07-27 08:56:40 +02:00
parent 24f0f3e3e1
commit 4639d85f00
3 changed files with 16 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
import os as _os
import logging as _logging
from datetime import datetime as _dt
from bot_libs import syms as _bot_syms
logger= _logging.getLogger(__name__)
file_handler= None
@@ -13,7 +14,8 @@ def get_log_name():
day= now.day
if day < 10: day= f'0{day}'
fname= f'battle_royale-{now.year}{month}{day}.log'
return fname
return _os.path.join(_bot_syms.LOG_PATH, fname)
def _create_file_handler():
current_log_file = get_log_name()