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, \
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, \
cache_dynamic_item *dyn_item, bool check_only) -> bool
{
constexpr const auto max_recursion = 20;
+ auto log_func = RSPAMD_LOG_FUNC;
auto inner_functor = [&](int recursion, cache_item *item, cache_dynamic_item *dyn_item, auto rec_functor) -> bool {
if (recursion > max_recursion) {
- msg_err_task ("cyclic dependencies: maximum check level %ud exceed when "
+ msg_err_task_lambda("cyclic dependencies: maximum check level %ud exceed when "
"checking dependencies for %s", max_recursion, item->symbol.c_str());
return true;
for (const auto &dep: item->deps) {
if (!dep.item) {
/* Assume invalid deps as done */
- msg_debug_cache_task("symbol %d(%s) has invalid dependencies on %d(%s)",
+ msg_debug_cache_task_lambda("symbol %d(%s) has invalid dependencies on %d(%s)",
item->id, item->symbol.c_str(), dep.id, dep.sym.c_str());
continue;
}
rec_functor)) {
ret = false;
- msg_debug_cache_task("delayed dependency %d(%s) for "
+ msg_debug_cache_task_lambda("delayed dependency %d(%s) for "
"symbol %d(%s)",
dep.id, dep.sym.c_str(), item->id, item->symbol.c_str());
}
else if (!process_symbol(task, cache, dep.item.get(), dep_dyn_item)) {
/* Now started, but has events pending */
ret = false;
- msg_debug_cache_task("started check of %d(%s) symbol "
+ msg_debug_cache_task_lambda("started check of %d(%s) symbol "
"as dep for "
"%d(%s)",
dep.id, dep.sym.c_str(), item->id, item->symbol.c_str());
}
else {
- msg_debug_cache_task("dependency %d(%s) for symbol %d(%s) is "
+ msg_debug_cache_task_lambda("dependency %d(%s) for symbol %d(%s) is "
"already processed",
dep.id, dep.sym.c_str(), item->id, item->symbol.c_str());
}
}
else {
- msg_debug_cache_task("dependency %d(%s) for symbol %d(%s) "
+ msg_debug_cache_task_lambda("dependency %d(%s) for symbol %d(%s) "
"cannot be started now",
dep.id, dep.sym.c_str(), item->id, item->symbol.c_str());
ret = false;
}
else {
/* Started but not finished */
- msg_debug_cache_task("dependency %d(%s) for symbol %d(%s) is "
+ msg_debug_cache_task_lambda("dependency %d(%s) for symbol %d(%s) is "
"still executing",
dep.id, dep.sym.c_str(), item->id, item->symbol.c_str());
ret = false;
}
}
else {
- msg_debug_cache_task("dependency %d(%s) for symbol %d(%s) is already "
+ msg_debug_cache_task_lambda("dependency %d(%s) for symbol %d(%s) is already "
"checked",
dep.id, dep.sym.c_str(), item->id, item->symbol.c_str());
}