[libvirt] [PATCH] daemon: Fix LIBVIRT_DEBUG=1 default output

Eric Blake eblake at redhat.com
Wed Oct 24 22:11:33 UTC 2012


On 10/24/2012 03:47 PM, Eric Blake wrote:
> On 10/24/2012 03:01 PM, Cole Robinson wrote:
>> This commit changes the behavior of LIBVIRT_DEBUG=1 libvirtd:
>>
>> $ git show 7022b09111d4322d21396a70d58320a9ad773962
>> commit 7022b09111d4322d21396a70d58320a9ad773962
>> Author: Daniel P. Berrange <berrange at redhat.com>
>> Date:   Thu Sep 27 13:13:09 2012 +0100
>>
>>     Automatically enable systemd journal logging
>>
>>     Probe to see if the systemd journal is accessible, and if
>>     so enable logging to the journal by default, rather than
>>     stderr (current default under systemd).
>>
>> Previously  'LIBVIRT_DEBUG=1 /usr/sbin/libvirtd' would show all debug
>> output to stderr, now it send debug output to the journal.
>>
>> Only use the journal by default if running in daemon mode, or
>> if stdin is _not_ a tty. This should make libvirtd launched from
>> systemd use the journal, but preserve the old behavior in most
>> situations.
> 
> Makes sense.

Thinking about it a bit more, should we be checking if stderr, rather
than stdin, is a ttty?  That is, if you run 'libvirtd </dev/null' from a
terminal, don't you still want output to the stderr tty?

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121024/9efb8769/attachment-0001.sig>


More information about the libvir-list mailing list