[Openais] [patch] improved logging and tracing support

Steven Dake sdake at redhat.com
Fri Apr 28 10:51:29 PDT 2006


Hans

Your patch looks good

Can you commit it?

Regards
-steve
On Thu, 2006-04-27 at 10:48 +0200, Hans Feldt wrote:
> Here's a new patch with:
> 
> - a fix for the problem described below
> - rests of old logging removed from all code (#define LOG_SERVICE...)
> - line feed added if not in message
> - new trace function added so that trace macros adds minimum of code and 
> runtime penalties to user code.
> - ENTER_ARGS macro changed to ENTER. ENTER macro now requires arguments. 
> I have seen this to be the most likely case. ENTER_VOID macro created.
> 
> Comments?
> 
> Regards,
> Hans
> 
> 
> Steven Dake wrote:
> > 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