mirror of
https://github.com/BEDOLAGA-DEV/remnawave-bedolaga-telegram-bot.git
synced 2026-02-28 07:11:37 +00:00
fix: force basicConfig to replace pre-existing handlers
logging.basicConfig() silently does nothing if the root logger already has handlers. When import-time side effects trigger stdlib logging before main() configures formatters, our ProcessorFormatter with pad_level=False never gets applied — producing [debug ] instead of [debug].
This commit is contained in:
2
main.py
2
main.py
@@ -119,6 +119,7 @@ async def main():
|
||||
logging.basicConfig(
|
||||
level=getattr(logging, settings.LOG_LEVEL),
|
||||
handlers=log_handlers,
|
||||
force=True,
|
||||
)
|
||||
|
||||
# Регистрируем хэндлеры для управления при ротации
|
||||
@@ -137,6 +138,7 @@ async def main():
|
||||
logging.basicConfig(
|
||||
level=getattr(logging, settings.LOG_LEVEL),
|
||||
handlers=log_handlers,
|
||||
force=True,
|
||||
)
|
||||
|
||||
# NOTE: TelegramNotifierProcessor and noisy logger suppression are
|
||||
|
||||
Reference in New Issue
Block a user