#include "utlist.h"
#include <math.h>
+/*
+ * Do not print more than this amount of elts
+ */
+static const int max_log_elts = 7;
+
static GQuark
rspamd_task_quark (void)
{
rspamd_fstring_t *symbuf;
struct symbol *sym;
GPtrArray *sorted_symbols;
- guint i;
+ guint i, j;
mres = g_hash_table_lookup (task->results, DEFAULT_METRIC);
rspamd_printf_fstring (&symbuf, "{");
+ j = 0;
+
for (cur = sym->options; cur != NULL; cur = g_list_next (cur)) {
rspamd_printf_fstring (&symbuf, "%s;", cur->data);
+
+ if (j >= max_log_elts) {
+ rspamd_printf_fstring (&symbuf, "...;");
+ break;
+ }
+ j ++;
}
rspamd_printf_fstring (&symbuf, "}");
lim = internet_address_list_length (ialist);
}
+
varbuf = rspamd_fstring_new ();
for (i = 0; i < lim; i++) {
varbuf = rspamd_fstring_append (varbuf, ",", 1);
}
}
+
+ if (i >= max_log_elts) {
+ varbuf = rspamd_fstring_append (varbuf, "...", 3);
+ break;
+ }
}
if (varbuf->len > 0) {
varbuf = rspamd_fstring_append (varbuf, ",", 1);
}
}
+
+ if (i >= max_log_elts) {
+ varbuf = rspamd_fstring_append (varbuf, "...", 3);
+ break;
+ }
}
if (varbuf->len > 0) {