Menu

#323 Color logs (color-codes for log levels)

v1.2.0
open
color logs (1)
4
2015-12-15
2015-12-15
Garima
No

I created a patch which supports color logs. This helps to indentify logs very easily.
Currenty, it is working for console logging. In case of file, message get appended with color codes.

I used following color codes for different log levels:
FATAL: Pink "\x1b[35m"
ERROR: Red "\x1b[31m"
WARN: Yellow "\x1b[33m"
INFO: Default color
DEBUG: GREEN "\x1b[32m"
TRACE: Cyan "\x1b[36m"

Color-logging can be enabled using --enable-color-logs option in configure.
./configure --prefix=<pathtoprefix> --enable-color-logs

Refer the attached patch.

1 Attachments

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.