case RSPAMD_CONTROL_HYPERSCAN_LOADED:
case RSPAMD_CONTROL_FUZZY_STAT:
case RSPAMD_CONTROL_FUZZY_SYNC:
+ case RSPAMD_CONTROL_LOG_PIPE:
break;
case RSPAMD_CONTROL_RERESOLVE:
if (cd->worker->srv->cfg) {
break;
case RSPAMD_SRV_LOG_PIPE:
memset (&wcmd, 0, sizeof (wcmd));
+ wcmd.type = RSPAMD_CONTROL_LOG_PIPE;
wcmd.cmd.log_pipe.type = cmd.cmd.log_pipe.type;
rspamd_control_broadcast_cmd (srv, &wcmd, rfd,
rspamd_control_log_pipe_io_handler, NULL);
out = g_string_sized_new (31);
for (i = 0; i < n; i ++) {
- rspamd_printf_gstring (out, "%s%d", i == 0 ? "" : ", ",
- sm->results[i]);
+
+ rspamd_printf_gstring (out, "%s%s", i == 0 ? "" : ", ",
+ rspamd_symbols_cache_symbol_by_id (ctx->cfg->cache,
+ sm->results[i]));
}
- msg_info ("got log line: %V", out);
+ msg_info ("got log line: %v", out);
g_string_free (out, TRUE);
g_free (sm);
}
struct log_helper_ctx *ctx = ud;
close (ctx->pair[1]);
+ msg_info ("start waiting for log events");
event_set (&ctx->log_ev, ctx->pair[0], EV_READ | EV_PERSIST,
rspamd_log_helper_read, ctx);
event_base_set (ctx->ev_base, &ctx->log_ev);