diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-06 13:46:29 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-06 13:46:29 +0100 |
commit | 6631202a8c3c4059a6897a5a5e6720ea1be86f2e (patch) | |
tree | 124f872ec55e79e57bde7e3d7b23cf1bb82660ae /src/libutil/logger.c | |
parent | 0fb417de5ca09cae92923ceb27c33f4865ba7ad5 (diff) | |
download | rspamd-6631202a8c3c4059a6897a5a5e6720ea1be86f2e.tar.gz rspamd-6631202a8c3c4059a6897a5a5e6720ea1be86f2e.zip |
Fix colored logging.
Diffstat (limited to 'src/libutil/logger.c')
-rw-r--r-- | src/libutil/logger.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libutil/logger.c b/src/libutil/logger.c index b948deaf1..3728b2fb4 100644 --- a/src/libutil/logger.c +++ b/src/libutil/logger.c @@ -697,15 +697,15 @@ file_log_function (const gchar * log_domain, cptype = g_quark_to_string (rspamd_log->process_type); if (rspamd_log->cfg->log_color) { - if (log_level >= G_LOG_LEVEL_INFO) { + if (log_level == G_LOG_LEVEL_INFO) { /* White */ - r = rspamd_snprintf (tmpbuf, sizeof (tmpbuf), "\033[1;37m"); + r = rspamd_snprintf (tmpbuf, sizeof (tmpbuf), "\033[0;37m"); } - else if (log_level >= G_LOG_LEVEL_WARNING) { + else if (log_level == G_LOG_LEVEL_WARNING) { /* Magenta */ - r = rspamd_snprintf (tmpbuf, sizeof (tmpbuf), "\033[2;32m"); + r = rspamd_snprintf (tmpbuf, sizeof (tmpbuf), "\033[0;32m"); } - else if (log_level >= G_LOG_LEVEL_CRITICAL) { + else if (log_level == G_LOG_LEVEL_CRITICAL) { /* Red */ r = rspamd_snprintf (tmpbuf, sizeof (tmpbuf), "\033[1;31m"); } |