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>
This commit is contained in:
parent
e7323e515a
commit
c66f0341d9
1 changed files with 1 additions and 1 deletions
2
log.c
2
log.c
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue