mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 20:06:18 +01:00
trivial: add some helpful comments
Not everybody knows console color codes by heart.
This commit is contained in:
parent
567e5548bb
commit
a4fc4c1e6e
@ -1476,17 +1476,17 @@ log_level_to_color (GLogLevelFlags log_level,
|
|||||||
return "";
|
return "";
|
||||||
|
|
||||||
if (log_level & G_LOG_LEVEL_ERROR)
|
if (log_level & G_LOG_LEVEL_ERROR)
|
||||||
return "\033[1;31m";
|
return "\033[1;31m"; /* red */
|
||||||
else if (log_level & G_LOG_LEVEL_CRITICAL)
|
else if (log_level & G_LOG_LEVEL_CRITICAL)
|
||||||
return "\033[1;35m";
|
return "\033[1;35m"; /* magenta */
|
||||||
else if (log_level & G_LOG_LEVEL_WARNING)
|
else if (log_level & G_LOG_LEVEL_WARNING)
|
||||||
return "\033[1;33m";
|
return "\033[1;33m"; /* yellow */
|
||||||
else if (log_level & G_LOG_LEVEL_MESSAGE)
|
else if (log_level & G_LOG_LEVEL_MESSAGE)
|
||||||
return "\033[1;32m";
|
return "\033[1;32m"; /* green */
|
||||||
else if (log_level & G_LOG_LEVEL_INFO)
|
else if (log_level & G_LOG_LEVEL_INFO)
|
||||||
return "\033[1;32m";
|
return "\033[1;32m"; /* green */
|
||||||
else if (log_level & G_LOG_LEVEL_DEBUG)
|
else if (log_level & G_LOG_LEVEL_DEBUG)
|
||||||
return "\033[1;32m";
|
return "\033[1;32m"; /* green */
|
||||||
|
|
||||||
/* No color for custom log levels. */
|
/* No color for custom log levels. */
|
||||||
return "";
|
return "";
|
||||||
|
Loading…
Reference in New Issue
Block a user