logzero
logzero copied to clipboard
Does not use nice color in Jupyter
- logzero version: 1.5.0
- Python version: 3.6
- Operating System: Linux
Description
Logzero is really neat and it would be great if one could make full use of it in Jupyter notebook. Unfortunately it does not recognize the color capability and the output shows no color formatting.
Two things would solve this:
- easy way to switch to STDOUT (without losing the formatter)
- enforcing TTY mode since apparently Jupyter notebook/lab can show color but does not announce that
What I Did
Do in Jupyter notebook (conda install notebook; jupyter notebook) or Jupyter lab.
from logzero import logger
logger.error("TEXT")
Any progress on this? I have the same problem. When I run a python program in standalone mode, I get lovely color-coded output (different colors for warnings, errors, info, debugging). But inside Jupyter, everything looks the same.
If someone can offer suggestions as to where to start, I'm happy to attempt to implement this, and submit patch.