diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2024-06-20 16:59:29 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-06-21 15:32:48 +0200 |
commit | c66f0341d94d255e647cca8c4b35192f0f32e181 (patch) | |
tree | e7fbc95cb9d216c6483dec4fbbe405ada4e505e9 | |
parent | e7323e515ad33191f779197e8b14d8d1c2ad531d (diff) | |
download | passt-c66f0341d94d255e647cca8c4b35192f0f32e181.tar passt-c66f0341d94d255e647cca8c4b35192f0f32e181.tar.gz passt-c66f0341d94d255e647cca8c4b35192f0f32e181.tar.bz2 passt-c66f0341d94d255e647cca8c4b35192f0f32e181.tar.lz passt-c66f0341d94d255e647cca8c4b35192f0f32e181.tar.xz passt-c66f0341d94d255e647cca8c4b35192f0f32e181.tar.zst passt-c66f0341d94d255e647cca8c4b35192f0f32e181.zip |
log: Don't report syslog failures to stderr after initialisation
If we daemonised, we can't use standard error. If we didn't, it's
rather annoying to have all those messages on standard error anyway,
and kind of pointless too, as the messages we wanted to print were
printed to standard error anyway.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | log.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -191,7 +191,7 @@ void passt_vsyslog(int pri, const char *format, va_list ap) if (format[strlen(format)] != '\n') n += snprintf(buf + n, BUFSIZ - n, "\n"); - if (log_sock >= 0 && send(log_sock, buf, n, 0) != n) + if (log_sock >= 0 && send(log_sock, buf, n, 0) != n && !log_runtime) fprintf(stderr, "Failed to send %i bytes to syslog\n", n); } |