diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-04-03 17:57:40 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-04-03 17:57:59 +0100 |
commit | bedfdd15011a34449432cd2d3a5afd36c89423a6 (patch) | |
tree | 1f9f761b80b74652974e416fd5c5278a7d57ac82 /src/libutil | |
parent | b8606a2916d39c6f0eacbc8c1530a003bda36c00 (diff) | |
download | rspamd-bedfdd15011a34449432cd2d3a5afd36c89423a6.tar.gz rspamd-bedfdd15011a34449432cd2d3a5afd36c89423a6.zip |
[Minor] Move some important messages to higher log level
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/logger.c | 4 | ||||
-rw-r--r-- | src/libutil/logger.h | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/libutil/logger.c b/src/libutil/logger.c index 0e057d1d8..0313638b6 100644 --- a/src/libutil/logger.c +++ b/src/libutil/logger.c @@ -1029,7 +1029,7 @@ file_log_function (const gchar *module, const gchar *id, cptype = g_quark_to_string (rspamd_log->process_type); if (rspamd_log->flags & RSPAMD_LOG_FLAG_COLOR) { - if (level_flags & G_LOG_LEVEL_INFO) { + if (level_flags & (G_LOG_LEVEL_INFO|G_LOG_LEVEL_MESSAGE)) { /* White */ r = rspamd_snprintf (tmpbuf, sizeof (tmpbuf), "\033[0;37m"); } @@ -1115,7 +1115,7 @@ file_log_function (const gchar *module, const gchar *id, mlen = strlen (message); if (rspamd_log->flags & RSPAMD_LOG_FLAG_COLOR) { - if (level_flags & G_LOG_LEVEL_INFO) { + if (level_flags & (G_LOG_LEVEL_INFO|G_LOG_LEVEL_MESSAGE)) { /* White */ r = rspamd_snprintf (tmpbuf, sizeof (tmpbuf), "\033[0;37m"); } diff --git a/src/libutil/logger.h b/src/libutil/logger.h index e48e1161a..3b55246ea 100644 --- a/src/libutil/logger.h +++ b/src/libutil/logger.h @@ -244,6 +244,10 @@ extern guint rspamd_task_log_id; task->task_pool->tag.tagname, task->task_pool->tag.uid, \ G_STRFUNC, \ __VA_ARGS__) +#define msg_notice_task_encrypted(...) rspamd_default_log_function (G_LOG_LEVEL_MESSAGE|RSPAMD_LOG_ENCRYPTED, \ + task->task_pool->tag.tagname, task->task_pool->tag.uid, \ + G_STRFUNC, \ + __VA_ARGS__) #define msg_info_task_encrypted(...) rspamd_default_log_function (G_LOG_LEVEL_INFO|RSPAMD_LOG_ENCRYPTED, \ task->task_pool->tag.tagname, task->task_pool->tag.uid, \ G_STRFUNC, \ @@ -257,7 +261,11 @@ extern guint rspamd_task_log_id; task ? task->task_pool->tag.tagname : NULL, task ? task->task_pool->tag.uid : NULL, \ G_STRFUNC, \ __VA_ARGS__) -#define msg_info_task_check(...) rspamd_default_log_function (G_LOG_LEVEL_INFO, \ +#define msg_info_task_check(...) rspamd_default_log_function (G_LOG_LEVEL_MESSAGE, \ + task ? task->task_pool->tag.tagname : NULL, task ? task->task_pool->tag.uid : NULL, \ + G_STRFUNC, \ + __VA_ARGS__) +#define msg_notice_task_check(...) rspamd_default_log_function (G_LOG_LEVEL_INFO, \ task ? task->task_pool->tag.tagname : NULL, task ? task->task_pool->tag.uid : NULL, \ G_STRFUNC, \ __VA_ARGS__) |