qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 14/19] log: Redirect stderr to logfile if deamoni


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PULL 14/19] log: Redirect stderr to logfile if deamonized
Date: Mon, 29 Feb 2016 10:07:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0


On 29/02/2016 09:57, Ján Tomko wrote:
> qemu-system-x86_64 -S -no-user-config -nodefaults -nographic -M none
>  -qmp unix:/var/lib/libvirt/qemu/capabilities.monitor.sock,server,nowait
>  -pidfile /var/lib/libvirt/qemu/capabilities.pidfile -daemonize

Can you test this patch?

diff --git a/util/log.c b/util/log.c
index 4dff00b..9402880 100644
--- a/util/log.c
+++ b/util/log.c
@@ -56,7 +56,8 @@ void do_qemu_set_log(int log_flags, bool use_own_buffers)
 #ifdef CONFIG_TRACE_LOG
     qemu_loglevel |= LOG_TRACE;
 #endif
-    if ((qemu_loglevel || is_daemonized()) && !qemu_logfile) {
+    if (!qemu_logfile &&
+        (qemu_loglevel || (is_daemonized() && logfilename)) {
         if (logfilename) {
             qemu_logfile = fopen(logfilename, log_append ? "a" : "w");
             if (!qemu_logfile) {

Thanks,

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]