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

Comments

3 participants
@ZenithDK
Contributor

ZenithDK commented Jun 27, 2014

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

This comment has been minimized.

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

This comment has been minimized.

Member

trygveaa commented Jun 27, 2014

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

This comment has been minimized.

Contributor

ZenithDK commented Jul 14, 2014

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

@jodal

This comment has been minimized.

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