[Openais] [patch] improved logging and tracing support

Steven Dake sdake at redhat.com
Thu Apr 13 16:44:51 PDT 2006


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'

>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