Closed joeyDIGs closed 1 year ago
It works for me. The log level must higher than INFO for it to be shown by default in Jupyter.
import nest_asyncio
nest_asyncio.apply()
import logging
import asyncio
async def coro():
logging.warning('OK')
await asyncio.sleep(0.1)
asyncio.run(coro())
Hello,
Once I've applied the patch as in the docs:
When I later ran some code that calls
asyncio.run(some_coroutine)
, which has logging, I didn't get any of the logs from the jupyter notebook cells, except for thelogger.exception(some_msg)
calls.