22 lines
452 B
Python
22 lines
452 B
Python
import uvloop
|
|
import asyncio
|
|
import logging
|
|
|
|
|
|
def main() -> None:
|
|
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
|
asyncio.run(async_main())
|
|
logging.info("Created async loop")
|
|
|
|
|
|
async def async_main() -> None:
|
|
loop = asyncio.get_event_loop()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
format='[%(levelname)s][%(name)s] %(message)s'
|
|
logging.basicConfig(level=logging.INFO, format=format)
|
|
|
|
logging.info("Started program")
|
|
main()
|