Open mehertz opened 1 year ago
To properly resolve, we can:
Option 3 would be my preference, though it has the downside of not being thread safe.
I presume option 3 affects the entire process and may end up in a feedback loop if running outside Jupyter (when os.stderr
is pointing at fd 2
).
I think we (also) need to figure out if Jupyter's IO redirection implementation buffers or not. If it does, we might not see any output until we release the GIL, making the warnings about long operations pointless.
Solution 1:
Solution 2:
Solution 3:
3 is probably the right long-term solution. @qc00 we should be able to detect at runtime if we're running in Jupyterhub, and only set the callback if we are.
This is not an issue with ArcticDB, but rather with JupyterHub which is not correctly redirecting output (JupyterLab also has this problem).
This issue is not present when using standalone notebook via jupyter notebook
as it correctly redirect outputs.
Describe the bug
Turning on logging doesn't produce valid logging output in Jupyter notebooks.
This works fine in
ipython
.Steps/Code to Reproduce
Expected Results
Logging such as this to be visible:
OS, Python Version and ArcticDB Version
Python, Linux
Backend storage used
All
Additional Context
Note this can be worked around by setting a file logger: