diff options
Diffstat (limited to 'src/libserver/logger')
-rw-r--r-- | src/libserver/logger/logger_console.c | 2 | ||||
-rw-r--r-- | src/libserver/logger/logger_file.c | 2 | ||||
-rw-r--r-- | src/libserver/logger/logger_private.h | 3 | ||||
-rw-r--r-- | src/libserver/logger/logger_syslog.c | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/src/libserver/logger/logger_console.c b/src/libserver/logger/logger_console.c index 1bc91007a..b348aa929 100644 --- a/src/libserver/logger/logger_console.c +++ b/src/libserver/logger/logger_console.c @@ -228,7 +228,7 @@ rspamd_log_console_log (const gchar *module, const gchar *id, if (id != NULL) { guint slen = strlen (id); - slen = MIN (LOG_ID, slen); + slen = MIN (RSPAMD_LOG_ID_LEN, slen); mr = rspamd_snprintf (m, mremain, "<%*.s>; ", slen, id); m += mr; diff --git a/src/libserver/logger/logger_file.c b/src/libserver/logger/logger_file.c index d8ce15de2..3d5cc148b 100644 --- a/src/libserver/logger/logger_file.c +++ b/src/libserver/logger/logger_file.c @@ -526,7 +526,7 @@ rspamd_log_file_log (const gchar *module, const gchar *id, if (id != NULL) { guint slen = strlen (id); - slen = MIN (LOG_ID, slen); + slen = MIN (RSPAMD_LOG_ID_LEN, slen); mr = rspamd_snprintf (m, mremain, "<%*.s>; ", slen, id); m += mr; diff --git a/src/libserver/logger/logger_private.h b/src/libserver/logger/logger_private.h index 23361e38d..4b0dbfef5 100644 --- a/src/libserver/logger/logger_private.h +++ b/src/libserver/logger/logger_private.h @@ -19,7 +19,6 @@ /* How much message should be repeated before it is count to be repeated one */ #define REPEATS_MIN 3 #define REPEATS_MAX 300 -#define LOG_ID 6 #define LOGBUF_LEN 8192 struct rspamd_log_module { @@ -39,7 +38,7 @@ struct rspamd_logger_error_elt { GQuark ptype; pid_t pid; gdouble ts; - gchar id[LOG_ID + 1]; + gchar id[RSPAMD_LOG_ID_LEN + 1]; gchar module[9]; gchar message[]; }; diff --git a/src/libserver/logger/logger_syslog.c b/src/libserver/logger/logger_syslog.c index ca7227990..ad10b7c13 100644 --- a/src/libserver/logger/logger_syslog.c +++ b/src/libserver/logger/logger_syslog.c @@ -92,7 +92,7 @@ rspamd_log_syslog_log (const gchar *module, const gchar *id, } syslog (syslog_level, "<%.*s>; %s; %s: %.*s", - LOG_ID, id != NULL ? id : "", + RSPAMD_LOG_ID_LEN, id != NULL ? id : "", module != NULL ? module : "", function != NULL ? function : "", (gint)mlen, message); |