aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/logger/logger_console.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/libserver/logger/logger_console.c b/src/libserver/logger/logger_console.c
index b348aa929..9aad85f6e 100644
--- a/src/libserver/logger/logger_console.c
+++ b/src/libserver/logger/logger_console.c
@@ -179,8 +179,11 @@ rspamd_log_console_log (const gchar *module, const gchar *id,
rspamd_file_lock (fd, FALSE);
#endif
- log_time (rspamd_get_calendar_ticks (),
- rspamd_log, timebuf, sizeof (timebuf));
+ if (!(rspamd_log->flags & RSPAMD_LOG_FLAG_SYSTEMD)) {
+ log_time (rspamd_get_calendar_ticks (),
+ rspamd_log, timebuf, sizeof (timebuf));
+ }
+
if (priv->log_color) {
if (level_flags & (G_LOG_LEVEL_INFO|G_LOG_LEVEL_MESSAGE)) {
/* White */
@@ -215,12 +218,20 @@ rspamd_log_console_log (const gchar *module, const gchar *id,
iov[niov++].iov_len = 1;
}
else {
- r += rspamd_snprintf (tmpbuf + r,
- sizeof (tmpbuf) - r,
- "%s #%P(%s) ",
- timebuf,
- rspamd_log->pid,
- rspamd_log->process_type);
+ if (!(rspamd_log->flags & RSPAMD_LOG_FLAG_SYSTEMD)) {
+ r += rspamd_snprintf (tmpbuf + r,
+ sizeof (tmpbuf) - r,
+ "%s #%P(%s) ",
+ timebuf,
+ rspamd_log->pid,
+ rspamd_log->process_type);
+ } else {
+ r += rspamd_snprintf (tmpbuf + r,
+ sizeof (tmpbuf) - r,
+ "#%P(%s) ",
+ rspamd_log->pid,
+ rspamd_log->process_type);
+ }
modulebuf[0] = '\0';
mremain = sizeof (modulebuf);