[Openais] [patch] improved logging and tracing support

Steven Dake sdake at redhat.com
Tue Apr 18 12:47:50 PDT 2006


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.
[SERV ] Registering service handler 'openais cluster closed process
group service v1.01'
[SERV ] openais component openais_cfg loaded.
[SERV ] Registering service handler 'openais configuration service'
[SERV ] openais component openais_msg loaded.
[SERV ] Registering service handler 'openais message service B.01.01'
[SERV ] openais component openais_lck loaded.
[SERV ] Registering service handler 'openais distributed locking service
B.01.01'
[SERV ] openais component openais_evt loaded.
[SERV ] Registering service handler 'openais event service B.01.01'
[SERV ] openais component openais_ckpt loaded.
[SERV ] Registering service handler 'openais checkpoint service B.01.01'
[SERV ] openais component openais_amf loaded.
[SERV ] Registering service handler 'openais availability management
framework B.01.01'
[SERV ] openais component openais_clm loaded.
[SERV ] Registering service handler 'openais cluster membership service
B.01.01'[SERV ] openais component openais_evs loaded.
[SERV ] Registering service handler 'openais extended virtual synchrony
service'
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 :)

Committed at revision 995.

Regards
-steve


On Tue, 2006-04-18 at 16:58 +0200, Hans Feldt wrote:
> Steven Dake wrote:
> > Hans,
> > 
> > I was unable to get the patch to compile against revision 979.  It
> > doesn't apply at all against revision 981 (because of the ykd merge).
> > 
> > The error I get with 4.1 4.0 and 3.4.5 gcc is:
> > 
> > cc  -O3 -Wall -fomit-frame-pointer -DOPENAIS_LINUX -I../include -
> > DOPENAIS_USER=\"ais\" -DOPENAIS_GROUP=\"ais\" -DOPENAIS_CONFDIR=
> > \"/etc/ais\" -fPIC   -c -o main.o main.c
> > main.c: In function ‘log_printf2’:
> > print.h:121: sorry, unimplemented: function ‘log_printf2’ can never be
> > inlined because it uses variable argument lists
> > make[1]: *** [main.o] Error 1
> > make[1]: Leaving directory `/s/logger/exec'
> 
> I used 3.4.2 with no problem. I then tried with 4.1 and the 
> always_inline directive for log_printf2 in print.h was the problem. I 
> rewrote the macros to get true inling for the actual "if (level < )" 
> statement.
> 
> So here is the fourth (last?) patch!
> 
> Please note the before log_setup() is called, output is according to 
> default. A chicken and egg problem...
> 
> Regards,
> Hans
> 
> > 
> >>From looking over the patch it looks pretty sound but we need to get
> > this compile failure sorted out.  I'd also like to play with it a little
> > bit to see it work.
> > 
> > I tried on fc5, rhel4 ws and Ubuntu.
> > 
> > Please note I'd like this to be merged asap since it touches alot of
> > files and the source base is a moving target.  We can fix up any
> > remaining errors or problems after we merge the core patch.
> > 
> > Regards
> > -steve
> > On Thu, 2006-04-13 at 14:09 +0200, Hans Feldt wrote:
> > 
> >>OK here is the new patch. I works according to our discussions below. 
> >>Level is _not_ printed.
> >>
> >>I have also tested with syslog and it can filter out debug messages now.
> >>
> >>There is one issue which I don't understand and the code does not work 
> >>that way. From the man page:
> >>
> >>
> >>>       logfile
> >>>              If the logoutput: file directive is set, this option specifies where the log file is written to.
> >>>                                                                                                                        
> >>>              The default is syslog.
> >>
> >>		^^^^^^^^^^^^^^^^^^^^^
> >>
> > 
> > 
> > The default logger is "to_syslog" so the man page is n error.  logfile
> > should be specified as a file like logfile=/var/tmp/ais
> > 
> > 
> >>An error?
> >>
> >>Regards,
> >>Hans
> >>
> >>Steven Dake wrote:
> >>
> >>>On Thu, 2006-04-13 at 09:15 +0200, Hans Feldt wrote:
> >>>
> >>>
> >>>>Steven Dake wrote:
> >>>>
> >>>>
> >>>>>On Tue, 2006-04-11 at 08:09 +0200, Hans Feldt wrote:
> >>>>>
> >>>>>
> >>>>>>- Why not remove the service name in the printout and use file & line 
> >>>>>>instead? Service name will only be used for setting level and tags to 
> >>>>>>trace. Feels like redundant info to me.
> >>>>>>
> >>>>>
> >>>>>For things like tracing I think this could make a lot of sense.  I am
> >>>>>not convinced that an end user would be happy seeing a generic status
> >>>>>message stating that openais executive exited at util.c:XXX.  These
> >>>>>types of file/line number warnings may be confusing.
> >>>>
> >>>>What about default using file & line for the debug level (including 
> >>>>tracing) and service name for all others (info, ...)?
> >>>>
> >>>>Then add an option to have file and line for everything?
> >>>>
> >>>
> >>>
> >>>great idea Hans...
> >>>
> >>>
> >>>
> >>>>>>- Printing the level seems unnecessary, syslog don't do that. Can I remove?
> >>>>
> >>>>Was this OK with you?
> >>>>
> >>>
> >>>
> >>>I don't have a strong preference either way.  I can make arguments for
> >>>both approaches.  I leave the decision in your hands unless someone else
> >>>in the community has a strong objection to removing these printings.
> >>>I'd still like to keep the data around - someday we may find it useful
> >>>to be able to filter on a particular level beyond what is done with
> >>>syslog.
> >>>
> >>>Regards
> >>>-steve
> >>>
> >>>
> >>>
> >>>>Regards,
> >>>>Hans
> >>>>
> >>>>
> >>>
> >>>
> >>>
> > 
> > 
> 




More information about the Openais mailing list