On Thu, Jun 20, 2024 at 06:15:18PM +0200, Stefano Brivio wrote: > 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 Reviewed-by: David Gibson > --- > log.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/log.c b/log.c > index a72b871..9ed6bc1 100644 > --- a/log.c > +++ b/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); > } > -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson