Re: [libvirt] [PATCH 5/6] Add an an internal API for emergency dump of debug buffer

2011-03-07 Thread Daniel P. Berrange
On Mon, Mar 07, 2011 at 09:32:59PM +0800, Daniel Veillard wrote: > On Mon, Mar 07, 2011 at 01:22:09PM +, Daniel P. Berrange wrote: > > On Mon, Mar 07, 2011 at 09:18:46PM +0800, Daniel Veillard wrote: > > > the problem is that I really want to empty the buffer as a > > > result of emitting the

Re: [libvirt] [PATCH 5/6] Add an an internal API for emergency dump of debug buffer

2011-03-07 Thread Daniel Veillard
On Mon, Mar 07, 2011 at 01:22:09PM +, Daniel P. Berrange wrote: > On Mon, Mar 07, 2011 at 09:18:46PM +0800, Daniel Veillard wrote: > > the problem is that I really want to empty the buffer as a > > result of emitting the logs, i.e. the reader will emit only once > > the content at most. > >

Re: [libvirt] [PATCH 5/6] Add an an internal API for emergency dump of debug buffer

2011-03-07 Thread Daniel Veillard
On Mon, Mar 07, 2011 at 10:06:35AM +, Daniel P. Berrange wrote: > On Mon, Mar 07, 2011 at 03:06:18PM +0800, Daniel Veillard wrote: > > On Fri, Mar 04, 2011 at 08:53:55AM -0700, Eric Blake wrote: > > > > > > snprintf is _not_ safe; it can call malloc. We probably ought to use a > > > manual de

Re: [libvirt] [PATCH 5/6] Add an an internal API for emergency dump of debug buffer

2011-03-07 Thread Daniel P. Berrange
On Mon, Mar 07, 2011 at 09:18:46PM +0800, Daniel Veillard wrote: > On Mon, Mar 07, 2011 at 10:18:57AM +, Daniel P. Berrange wrote: > > On Mon, Mar 07, 2011 at 03:06:18PM +0800, Daniel Veillard wrote: > > > On Fri, Mar 04, 2011 at 08:53:55AM -0700, Eric Blake wrote: > > > > Is virLogLock async-s

Re: [libvirt] [PATCH 5/6] Add an an internal API for emergency dump of debug buffer

2011-03-07 Thread Daniel Veillard
On Mon, Mar 07, 2011 at 10:18:57AM +, Daniel P. Berrange wrote: > On Mon, Mar 07, 2011 at 03:06:18PM +0800, Daniel Veillard wrote: > > On Fri, Mar 04, 2011 at 08:53:55AM -0700, Eric Blake wrote: > > > Is virLogLock async-signal-safe? > > > > I could not find, I'm afraid it's implementation d

Re: [libvirt] [PATCH 5/6] Add an an internal API for emergency dump of debug buffer

2011-03-07 Thread Daniel P. Berrange
On Mon, Mar 07, 2011 at 03:06:18PM +0800, Daniel Veillard wrote: > On Fri, Mar 04, 2011 at 08:53:55AM -0700, Eric Blake wrote: > > On 03/04/2011 03:30 AM, Daniel Veillard wrote: > > > virLogEmergencyDumpAll() allows to dump the content of the > > > debug buffer from within a signal handler. It save

Re: [libvirt] [PATCH 5/6] Add an an internal API for emergency dump of debug buffer

2011-03-07 Thread Daniel P. Berrange
On Mon, Mar 07, 2011 at 03:06:18PM +0800, Daniel Veillard wrote: > On Fri, Mar 04, 2011 at 08:53:55AM -0700, Eric Blake wrote: > > On 03/04/2011 03:30 AM, Daniel Veillard wrote: > > > virLogEmergencyDumpAll() allows to dump the content of the > > > debug buffer from within a signal handler. It save

Re: [libvirt] [PATCH 5/6] Add an an internal API for emergency dump of debug buffer

2011-03-06 Thread Daniel Veillard
On Fri, Mar 04, 2011 at 08:53:55AM -0700, Eric Blake wrote: > On 03/04/2011 03:30 AM, Daniel Veillard wrote: > > virLogEmergencyDumpAll() allows to dump the content of the > > debug buffer from within a signal handler. It saves to all > > log file or stderr if none is found > > * src/util/logging.h

Re: [libvirt] [PATCH 5/6] Add an an internal API for emergency dump of debug buffer

2011-03-04 Thread Eric Blake
On 03/04/2011 03:30 AM, Daniel Veillard wrote: > virLogEmergencyDumpAll() allows to dump the content of the > debug buffer from within a signal handler. It saves to all > log file or stderr if none is found > * src/util/logging.h src/util/logging.c: add the new API > and cleanup the old virLogDum

Re: [libvirt] [PATCH 5/6] Add an an internal API for emergency dump of debug buffer

2011-03-04 Thread Daniel Veillard
On Fri, Mar 04, 2011 at 11:33:16AM +, Daniel P. Berrange wrote: > On Fri, Mar 04, 2011 at 06:30:56PM +0800, Daniel Veillard wrote: > > > > virLogEmergencyDumpAll() allows to dump the content of the > > debug buffer from within a signal handler. It saves to all > > log file or stderr if none is

Re: [libvirt] [PATCH 5/6] Add an an internal API for emergency dump of debug buffer

2011-03-04 Thread Daniel P. Berrange
On Fri, Mar 04, 2011 at 06:30:56PM +0800, Daniel Veillard wrote: > > virLogEmergencyDumpAll() allows to dump the content of the > debug buffer from within a signal handler. It saves to all > log file or stderr if none is found > * src/util/logging.h src/util/logging.c: add the new API > and clea

[libvirt] [PATCH 5/6] Add an an internal API for emergency dump of debug buffer

2011-03-04 Thread Daniel Veillard
virLogEmergencyDumpAll() allows to dump the content of the debug buffer from within a signal handler. It saves to all log file or stderr if none is found * src/util/logging.h src/util/logging.c: add the new API and cleanup the old virLogDump code * src/libvirt_private.syms: exports it as a priva