* @param mod
* @return
*/
-guint rspamd_logger_add_debug_module (const gchar *mod);
+gint rspamd_logger_add_debug_module (const gchar *mod);
/*
* Macro to use for faster debug modules
/* Just fprintf message to stderr */
if (level >= G_LOG_LEVEL_INFO) {
end = rspamd_vsnprintf (logbuf, sizeof (logbuf), fmt, args);
-
- if (!(rspamd_log->flags & RSPAMD_LOG_FLAG_RSPAMADM)) {
- if ((nescaped = rspamd_log_line_need_escape (logbuf, end - logbuf)) != 0) {
- gsize unsecaped_len = end - logbuf;
- gchar *logbuf_escaped = g_alloca (unsecaped_len + nescaped * 4);
- log_line = logbuf_escaped;
-
- end = rspamd_log_line_hex_escape (logbuf, unsecaped_len,
- logbuf_escaped, unsecaped_len + nescaped * 4);
- }
- }
-
rspamd_fprintf (stderr, "%*s\n", (gint)(end - log_line),
log_line);
}
}
}
-guint
+gint
rspamd_logger_add_debug_module (const gchar *mname)
{
struct rspamd_log_module *m;
if (mname == NULL) {
- return (guint)-1;
+ return -1;
}
if (log_modules == NULL) {