I am currently using Jupyter notebook and I would like to force it to print out Python logs to the output cell.
I am using old notebook tha
The earlier answers seem no longer to work. The most complete one no longer works because there are no default handlers, so modifying the zeroeth doesn't work. Also, messing with the root logger seems potentially fraught when running in a notebook.
In order to get the "foo" logger to put its output in the cell you can do the following:
logger = logging.getLogger("foo")
logger.addHandler(logging.StreamHandler(stream=sys.stdout))
So add the handler yourself, and direct its output.