]> xenbits.xensource.com Git - libvirt.git/commit
Allow to dynamically set the size of the debug buffer
authorDaniel Veillard <veillard@redhat.com>
Tue, 8 Mar 2011 10:31:20 +0000 (18:31 +0800)
committerDaniel Veillard <veillard@redhat.com>
Tue, 15 Mar 2011 07:13:21 +0000 (15:13 +0800)
commitb16f47ab614ffd5dc37efb4c8581f57b8a2ce3c7
treec8e2657d61f73f68ad4648baf2687b3003bf33e4
parent1c5dc4c60754d1f7015c273bba9dc0ff93ce7120
Allow to dynamically set the size of the debug buffer

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
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
* src/util/logging.h src/util/logging.c src/libvirt_private.syms:
  make buffer dynamic and add virLogSetBufferSize() internal API
* daemon/libvirtd.conf: document the new log_buffer_size option
* daemon/libvirtd.c: read and use the new log_buffer_size option
daemon/libvirtd.c
daemon/libvirtd.conf
src/libvirt_private.syms
src/util/logging.c
src/util/logging.h