summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-03 17:57:40 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-03 17:57:59 +0100
commitbedfdd15011a34449432cd2d3a5afd36c89423a6 (patch)
tree1f9f761b80b74652974e416fd5c5278a7d57ac82 /src
parentb8606a2916d39c6f0eacbc8c1530a003bda36c00 (diff)
downloadrspamd-bedfdd15011a34449432cd2d3a5afd36c89423a6.tar.gz
rspamd-bedfdd15011a34449432cd2d3a5afd36c89423a6.zip
[Minor] Move some important messages to higher log level
Diffstat (limited to 'src')
-rw-r--r--src/libserver/protocol.c4
-rw-r--r--src/libserver/task.c2
-rw-r--r--src/libutil/logger.c4
-rw-r--r--src/libutil/logger.h10
4 files changed, 14 insertions, 6 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index d1f1da797..f9e9b3051 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -686,7 +686,7 @@ urls_protocol_cb (gpointer key, gpointer value, gpointer ud)
len = task->from_envelope->addr_len;
}
- msg_info_task_encrypted ("<%s> %s: %*s; ip: %s; URL: %*s",
+ msg_notice_task_encrypted ("<%s> %s: %*s; ip: %s; URL: %*s",
task->message_id,
has_user ? "user" : "from",
len, user_field,
@@ -1211,7 +1211,7 @@ rspamd_protocol_http_reply (struct rspamd_http_message *msg,
if (task->cfg->log_flags & RSPAMD_LOG_FLAG_RE_CACHE) {
restat = rspamd_re_cache_get_stat (task->re_rt);
g_assert (restat != NULL);
- msg_info_task (
+ msg_notice_task (
"regexp statistics: %ud pcre regexps scanned, %ud regexps matched,"
" %ud regexps total, %ud regexps cached,"
" %HL bytes scanned using pcre, %HL bytes scanned total",
diff --git a/src/libserver/task.c b/src/libserver/task.c
index e723fd955..55adc1a4f 100644
--- a/src/libserver/task.c
+++ b/src/libserver/task.c
@@ -1467,7 +1467,7 @@ rspamd_task_write_log (struct rspamd_task *task)
}
}
- msg_info_task ("%V", logbuf);
+ msg_notice_task ("%V", logbuf);
rspamd_fstring_free (logbuf);
}
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__)