This is the part allowing to dynamically resize the debug log
buffer from it's default 64kB size. The buffer is now dynamically
allocated.
It adds a new API virLogSetBufferSize() which resizes the buffer
(possibly dynamically but in that case the existing content is lost -
the complexity wasn't looking like worth it).
If passed a zero size, the buffer is deallocated and we do the small
optimization of not formatting messages which are not output anymore.
On the daemon side, it just adds a new option log_buffer_size to
libvirtd.conf and call virLogSetBufferSize() if needed (minor
pbm of the GET_CONF_* macros is you can't guess if the value was set
or not)
Seems to work fine, I tried to keep the code as simple as needed,
this allowed me to find out that on a quiet daemon startup we emit
half a megabyte of debug log !
The next patch missing now is the update of the documentation for the
log buffer.
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/