forked from kodorvan/stcs
Update loggers
This commit is contained in:
@@ -1,24 +1,25 @@
|
||||
import asyncio
|
||||
|
||||
import logging.config
|
||||
from aiogram import Bot, Dispatcher
|
||||
from aiogram.filters import Command, CommandStart
|
||||
from aiogram.types import Message
|
||||
|
||||
from app.telegram.database.models import async_main
|
||||
|
||||
from app.telegram.handlers.handlers import router
|
||||
from app.telegram.functions.main_settings.settings import router_main_settings
|
||||
from app.telegram.handlers.handlers import router
|
||||
from app.telegram.functions.main_settings.settings import router_main_settings
|
||||
from app.telegram.functions.risk_management_settings.settings import router_risk_management_settings
|
||||
from app.telegram.functions.condition_settings.settings import condition_settings_router
|
||||
from app.services.Bybit.functions.Add_Bybit_API import router_register_bybit_api
|
||||
from app.services.Bybit.functions.functions import router_functions_bybit_trade
|
||||
|
||||
from logger_helper.logger_helper import LOGGING_CONFIG
|
||||
from config import TOKEN_TG_BOT_1, TOKEN_TG_BOT_2, TOKEN_TG_BOT_3
|
||||
|
||||
from config import TOKEN_TG_BOT
|
||||
logging.config.dictConfig(LOGGING_CONFIG)
|
||||
logger = logging.getLogger("main")
|
||||
|
||||
from app.telegram.logs import logger
|
||||
|
||||
bot = Bot(token=TOKEN_TG_BOT)
|
||||
bot = Bot(token=TOKEN_TG_BOT_1)
|
||||
dp = Dispatcher()
|
||||
|
||||
async def main():
|
||||
@@ -35,6 +36,7 @@ async def main():
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
logger.info("Bot is on")
|
||||
asyncio.run(main())
|
||||
except KeyboardInterrupt:
|
||||
print("Bot is off")
|
||||
logger.info("Bot is off")
|
||||
|
Reference in New Issue
Block a user