Добавлен логгер в тестовую сборку
This commit is contained in:
@@ -20,6 +20,7 @@ from libs.tokens_formatter import TOKENS
|
|||||||
|
|
||||||
import CoreFun
|
import CoreFun
|
||||||
|
|
||||||
|
logging = CoreFun.logging
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
stop_event = asyncio.Event()
|
stop_event = asyncio.Event()
|
||||||
@@ -66,9 +67,9 @@ async def main():
|
|||||||
await asyncio.gather(*bot_tasks, monitor_task)
|
await asyncio.gather(*bot_tasks, monitor_task)
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print(f"{datetime.datetime.now().strftime('%H:%M:%S %d-%m-%Y')}:: Боты остановлены по запросу пользователя")
|
logging.info("Боты остановлены по запросу пользователя")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"{datetime.datetime.now().strftime('%H:%M:%S %d-%m-%Y')}:: Произошла критическая ошибка: {e}")
|
logging.exception(f"Произошла критическая ошибка")
|
||||||
finally:
|
finally:
|
||||||
|
|
||||||
# Остановка всех ботов
|
# Остановка всех ботов
|
||||||
|
|||||||
Reference in New Issue
Block a user