[Openais] [patch] improved logging and tracing support

Steven Dake sdake at redhat.com
Wed Apr 19 13:27:40 PDT 2006


On Wed, 2006-04-19 at 08:24 +0200, Hans Feldt wrote:
> Steven Dake wrote:
> > Hans
> > 
> > The patch looks great
> > 
> > I noticed one small bug it appears logging configuration should be setup
> > before other operations.  Example:
> > [SERV ] openais component openais_cpg loaded.
> ...
> > Apr 18 12:42:20.255558 [totemsrp.c:694] Token Timeout (1000 ms)
> > retransmit timeout (238 ms)
> > 
> > Note the fileline: on operation now changes over at the wrong time.  I'd
> > expect all printouts to be of the same format.
> > 
> > A problem for another patch if you have time :)
> 
> I described it as a chicken and egg problem in my mail below. How do we 
> solve it? The only thing as I see it is to buffer printouts until 
> log_setup() has been called. At early exit (config errors etc.) the 
> buffer has to be flushed.
> 

Good idea Hans,

This seems like a reasonable approach.  We know that we will have few
messages to buffer before the actual log_setup call.  At log_setup, we
could flush any pending messages according to the log settings.  We
could also have a "log_flush" which would flush all messages to syslog,
and errors to stderr.

Regards
-steve

> > Committed at revision 995.
> 
> Thanks, I still haven't figured out the details how to commit to the 
> repository but I am on to it.
> 
> Regards,
> Hans
> 
> 




More information about the Openais mailing list