Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Does not use nice color in Jupyter #104

Open
Gerenuk opened this issue Jun 12, 2018 · 1 comment
Open

Does not use nice color in Jupyter #104

Gerenuk opened this issue Jun 12, 2018 · 1 comment

Comments

@Gerenuk
Copy link

Gerenuk commented Jun 12, 2018

  • 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")
@dom-insytesys
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants