aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/logger/logger_console.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-27 15:04:00 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-07-27 15:04:00 +0100
commitdb7c404ef5730e610c93fa810580892b41ddcdaa (patch)
tree02f4a53cbcbbde19739182c9f3820ba483472d55 /src/libserver/logger/logger_console.c
parentd04d853075c827d504bfcb56846fbdc3563b9f65 (diff)
downloadrspamd-db7c404ef5730e610c93fa810580892b41ddcdaa.tar.gz
rspamd-db7c404ef5730e610c93fa810580892b41ddcdaa.zip
[Minor] Ensure that log line is separated by space
Diffstat (limited to 'src/libserver/logger/logger_console.c')
-rw-r--r--src/libserver/logger/logger_console.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libserver/logger/logger_console.c b/src/libserver/logger/logger_console.c
index 3e142fe27..2c1c535d5 100644
--- a/src/libserver/logger/logger_console.c
+++ b/src/libserver/logger/logger_console.c
@@ -279,6 +279,11 @@ rspamd_log_console_log (const gchar *module, const gchar *id,
mremain -= mr;
}
+ /* Ensure that we have a space at the end */
+ if (m > modulebuf && *(m - 1) != ' ') {
+ *(m - 1) = ' ';
+ }
+
iov[niov].iov_base = tmpbuf;
iov[niov++].iov_len = r;
iov[niov].iov_base = modulebuf;