logzero icon indicating copy to clipboard operation
logzero copied to clipboard

Does not use nice color in Jupyter

Open Gerenuk opened this issue 6 years ago • 1 comments

  • 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")

Gerenuk avatar Jun 12 '18 12:06 Gerenuk

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.

dom-insytesys avatar Nov 01 '21 21:11 dom-insytesys