Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colorize logs for easier readability #772

Closed
ZenithDK opened this issue Jun 27, 2014 · 4 comments · Fixed by #780
Closed

Colorize logs for easier readability #772

ZenithDK opened this issue Jun 27, 2014 · 4 comments · Fixed by #780
Assignees
Labels
C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal

Comments

@ZenithDK
Copy link
Contributor

It would be nice to have some colors added to the mopidy log output to make it easier to spot errors, warnings, etc.

A quick search led me to this library: https://pypi.python.org/pypi/coloredlogs

I tested it out quickly by just inserting that snippet of code, and this was what I got:
ubuntu

@jodal
Copy link
Member

jodal commented Jun 27, 2014

This would be really nice.

Though, I'm more positive to colorama since it is packaged in Debian and also works on Windows.

@trygveaa
Copy link
Member

I would prefer if the dependency is optional. Both because I like few dependencies in general, and since none of those are packaged in Arch.

@ZenithDK
Copy link
Contributor Author

Nice, I like how we get colorized logs and yet do not get any new dependencies.
Thanks @jodal!

@jodal
Copy link
Member

jodal commented Jul 14, 2014

I found colorama to be quite optional, but very useful the second you require Windows support.

If we ever start supporting Windows seriously, we just need to add an optional dependency on colorama and if colorama is present run:

import colorama
colorama.init()

...and let the colorization code run on Windows as well, and it should work seamlessly there too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants