From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAdMt-0000cT-7M for qemu-devel@nongnu.org; Fri, 25 Jul 2014 07:09:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAdMl-0006wZ-HW for qemu-devel@nongnu.org; Fri, 25 Jul 2014 07:08:55 -0400 Received: from [58.251.49.30] (port=58315 helo=mail.sangfor.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAdMl-0006ty-0Q for qemu-devel@nongnu.org; Fri, 25 Jul 2014 07:08:47 -0400 Date: Fri, 25 Jul 2014 19:07:15 +0800 From: "=?utf-8?B?WmhhbmcgSGFveXU=?=" References: <201407251442088727201@sangfor.com>, <874my5hh4s.fsf@linaro.org> Message-ID: <201407251907132706648@sangfor.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] =?utf-8?q?=5Bquestions=5D_about_qemu_log?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?B?QWxleCBCZW5uw6ll?= Cc: =?utf-8?B?cWVtdS1kZXZlbA==?= >> Hi, all >> >> If I use qemu command directly to run vm, bypass libvirt, how to configure qemu to assure that each vm has its own log file, like vmname.log? >> For example, VM: rhel7-net has its own log file, rhel7-net.log, >> VM:rhel7-stor has its own log file, rhel7-stor.log. > >-D /path/to/unique/file/name.log > -D option is to configure qemu_logfile for the output logs which are controlled by qmp command "logfile", which can be enabled/disabled on run time. I want to configure the log file for the output of fprintf(stderr, fmt, ...), .etc, i.e., how to redirect the output of fprintf(stderr, fmt, ...), or some other log-interface to a specified file? I saw the configuration in qemuStateInitialize(), libvirt code, but now I run the vm directly through qemu command, bypass libvirt. Thanks, Zhang Haoyu >Or am I misunderstanding what you want?