diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-05-14 12:07:03 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-05-14 12:07:03 +0100 |
commit | 7ae4d091ce49880128879da792c063db1a395290 (patch) | |
tree | 28e1ae96f1939151df7564243bf1bde4631366e9 /src/libserver/logger.h | |
parent | 32b24e6d938192203f9d4bb61e7bbc003f6345a1 (diff) | |
download | rspamd-7ae4d091ce49880128879da792c063db1a395290.tar.gz rspamd-7ae4d091ce49880128879da792c063db1a395290.zip |
[Minor] Improve logging in lambdas
Diffstat (limited to 'src/libserver/logger.h')
-rw-r--r-- | src/libserver/logger.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libserver/logger.h b/src/libserver/logger.h index ae3ea4694..35792e68e 100644 --- a/src/libserver/logger.h +++ b/src/libserver/logger.h @@ -290,6 +290,10 @@ extern guint rspamd_task_log_id; task->task_pool->tag.tagname, task->task_pool->tag.uid, \ RSPAMD_LOG_FUNC, \ __VA_ARGS__) +#define msg_err_task_lambda(...) rspamd_default_log_function (G_LOG_LEVEL_CRITICAL, \ + task->task_pool->tag.tagname, task->task_pool->tag.uid, \ + log_func, \ + __VA_ARGS__) #define msg_warn_task(...) rspamd_default_log_function (G_LOG_LEVEL_WARNING, \ task->task_pool->tag.tagname, task->task_pool->tag.uid, \ RSPAMD_LOG_FUNC, \ @@ -310,6 +314,10 @@ extern guint rspamd_task_log_id; rspamd_task_log_id, "task", task->task_pool->tag.uid, \ RSPAMD_LOG_FUNC, \ __VA_ARGS__) +#define msg_debug_task_lambda(...) rspamd_conditional_debug_fast (NULL, task->from_addr, \ + rspamd_task_log_id, "task", task->task_pool->tag.uid, \ + log_func, \ + __VA_ARGS__) #define msg_err_task_encrypted(...) rspamd_default_log_function (G_LOG_LEVEL_CRITICAL|RSPAMD_LOG_ENCRYPTED, \ task->task_pool->tag.tagname, task->task_pool->tag.uid, \ RSPAMD_LOG_FUNC, \ |