Bug 965665 - [rfe] Make the logging colored
Summary: [rfe] Make the logging colored
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-nitrate
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Šplíchal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-21 13:44 UTC by Lukáš Zachar
Modified: 2016-06-01 01:44 UTC (History)
3 users (show)

Fixed In Version: python-nitrate-1.0-0.fc20
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-18 22:54:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Log-coloring-for-ERROR-and-WARNING-log-levels (999 bytes, patch)
2013-05-21 15:06 UTC, Filip Holec
no flags Details | Diff

Description Lukáš Zachar 2013-05-21 13:44:12 UTC
I use nitrate.log to do the logging and it would be nice if WARN and ERROR logging levels were colored when applicable (e.g. it's run from the terminal).
There are plenty of 'Doing xyz' messages usually and Warning/Error can be lost between them.

ERROR should be red, but I'm not sure how to color WARN.

Examples of colored logging:
https://gist.github.com/brainsik/1238935
https://gist.github.com/vsajip/758430

Comment 1 Filip Holec 2013-05-21 15:06:50 UTC
Created attachment 751217 [details]
Log-coloring-for-ERROR-and-WARNING-log-levels

This patch should resolve the issue

Comment 2 Petr Šplíchal 2013-05-22 13:29:44 UTC
Lukáš, thanks for the idea and Filip for the way how to implement
this. I've adjusted your patch to use the color() method instead
of having to supply color naming in the number format. Pushed:

https://github.com/psss/python-nitrate/commit/e264332

Comment 3 Fedora Update System 2014-04-11 15:25:54 UTC
python-nitrate-1.0-0.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-nitrate-1.0-0.fc20

Comment 4 Fedora Update System 2014-04-15 15:36:56 UTC
Package python-nitrate-1.0-0.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-nitrate-1.0-0.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5095/python-nitrate-1.0-0.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-05-18 22:54:11 UTC
python-nitrate-1.0-0.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.