mirror of
https://github.com/civsocit/olgram.git
synced 2023-07-22 01:29:12 +03:00
logging
This commit is contained in:
parent
173014fda0
commit
d0f9042fb6
3
main.py
3
main.py
@ -15,9 +15,6 @@ import olgram.commands.info # noqa: F401
|
|||||||
|
|
||||||
from server.server import main as server_main
|
from server.server import main as server_main
|
||||||
|
|
||||||
import logging
|
|
||||||
logging.basicConfig(level=logging.INFO)
|
|
||||||
|
|
||||||
|
|
||||||
async def init_database():
|
async def init_database():
|
||||||
await Tortoise.init(config=TORTOISE_ORM)
|
await Tortoise.init(config=TORTOISE_ORM)
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
|
||||||
from olgram.migrations.custom import migrate
|
from olgram.migrations.custom import migrate
|
||||||
|
|
||||||
logging.basicConfig(level=logging.INFO)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
asyncio.get_event_loop().run_until_complete(migrate())
|
asyncio.get_event_loop().run_until_complete(migrate())
|
||||||
|
@ -13,8 +13,8 @@ from olgram.settings import ServerSettings
|
|||||||
from olgram.models.models import Bot, GroupChat, BannedUser
|
from olgram.models.models import Bot, GroupChat, BannedUser
|
||||||
|
|
||||||
|
|
||||||
logging.basicConfig(level=logging.INFO)
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
_logger.setLevel(logging.INFO)
|
||||||
|
|
||||||
db_bot_instance: ContextVar[Bot] = ContextVar('db_bot_instance')
|
db_bot_instance: ContextVar[Bot] = ContextVar('db_bot_instance')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user