qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Question in QEMU : The result of printf does not appear


From: Daniel P . Berrangé
Subject: Re: [Qemu-devel] Question in QEMU : The result of printf does not appear in the qemu VM's log.
Date: Wed, 8 May 2019 10:15:19 +0100
User-agent: Mutt/1.11.4 (2019-03-13)

On Wed, May 08, 2019 at 10:51:00AM +0900, S KH wrote:
> Hello.
> 
> I'am student studying QEMU hypervisor and SPICE.
> 
> In order to find out the calling order of functions in QEMU source, I input
> and compiled 'printf ("% s \ n", __ func__) "into source.

If using  printf() output is buffered so may not appear immediately in
the logs. For debugging it is best to use  g_printerr("%s\n", __func__)
which gets sent to stderr which is unbuffered so will appear immediately.

Of course the other possib8lity is that the code where you put ehe
printf statements is not being invoked by the tests you're trying.
 
> And when I run the VM and open 'domain_name.log' in '/ var / log / libvirt
> / qemu', I see that no output from printf is displayed.

The log file libvirt creates will capture both stdout & stderr.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



reply via email to

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