[libvirt] RFC move logging initialization earlier in libvirtd

Dave Allan dallan at redhat.com
Tue Nov 10 18:58:52 UTC 2009

Daniel P. Berrange wrote:
> On Tue, Nov 10, 2009 at 11:32:29AM -0500, Dave Allan wrote:
>> I noticed yesterday that logging gets initialized fairly far into the 
>> libvirtd startup process, so messages generated during server startup 
>> don't get logged to the same sinks that will be used for the rest of the 
>> life of the daemon.  I'd like to explore moving the logging startup to 
>> an earlier point.  Has this idea been explored previously?
> Is this still true with latest GIT ?
> When i re-arranged the libvirtd startup code last week I think I may
> have accidentely fixed the issue. Previously the libvirt drivers would
> get initialized in the qemudInitialize() call, and this was done before
> loading the libvirtd config file and thus before logging was setup.
> With latest code, driver initialization is moved out of qemudInitialize
> and is absolutely the last thing libvirtd does during startup. There's
> not really any way to move the logging configuration further forward
> than it is now
> Daniel

I just confirmed that it is the case with the latest git.  I'm trying to 
finish up the udev code today, so I'm not going to look into it now, but 
I did check to see that the udev register function is called before the 
first call to virLogDefineOutput.  Maybe that's not the right test, though.


More information about the libvir-list mailing list