Debug/trace logging in a custom Jupyter kernel

from blog Alex W.'s Blog, | ↗ original
I was unable to get Jupyter to report any logs from my custom kernel, even when I was running jupyter labs --debug. This was the case for both print calls and logging.{critical,debug,etc.} calls. To work around it I configured my kernel’s logger to write to a file using logging.basicConfig(filename="kernel.log"). The Jupyter runtime can’t eat...