[Openais] Re: openais and syslog
Mark Haverkamp
markh at osdl.org
Wed Oct 6 12:52:25 PDT 2004
On Wed, 2004-10-06 at 12:35, Steven Dake wrote:
> On Wed, 2004-10-06 at 11:29, Mark Haverkamp wrote:
> > On Wed, 2004-10-06 at 11:23, Steven Dake wrote:
> > > Mark,
> > >
> > > unnecessary signals are evil.. It was causing some havok with something
> > > which I have now forgotten.
> >
> > It only installs a handler to clean up in case the pipe closes while it
> > is sending. It doesn't generate a signal.
> >
>
> hmm ok it was doing something strange I remember, but what I dont :) I
> think it was that a sigpipe was generated on every syslog call because
> syslog closed the fd after every call. but I could be wrong.
>
> > > If your interested in getting this
> > > functionality straightened out, check out exec/log/print.c It will log
> > > to the syslog facility.
> >
> > OK, I'll take a look.
> >
> > > I have not integrated it yet because i think
> > > people want a choice (log to syslog, log to console, log to file) and
> > > that work is not implemented in that file yet.
> >
> > We could have compile and/or a command line option for the kind of log
> > output to use.
> >
> >
> > Mark.
> >
>
> I've been thinking about how to configure this. Runtime configurable is
> more desireable then compile time... Perhaps we should do the
> following:
> merge network.conf parsing into /etc/ais/openais.conf
> merge log configuration parsing into /etc/ais/openais.conf
> (we could even merge authkey into openais.conf)
>
> Then openais.conf would look like:
> # network configuration
> network {
> bindnetaddr:192.168.1.0
> mcastaddr:226.94.1.1
> mcastport:6000
> }
>
For development builds, I'd like to be able to turn on and off debug
output without recompiling too. Debug code could still be completely
compiled out with a production build.
> # logging configuration
> log {
> type:file (or syslog or stderr)
> filename:/var/log/openais.log
> timestamp:yes (or no)
debug: yes/no
> }
>
> authkey {
> key data
> }
>
> Any other bells that are needed? This will help us prepare for the more
> enhanced logging of gmi so we can knock out the remaining gmi bugs.
>
> I'd also like to make log_printf take a parameter which is the service
> that is logging. ie:
>
> log_printf (LOG_LEVEL_SECURITY|LOG_SERVICE_AMF, "some text");
>
> and out comes:
> date/time: SECURITY: AMF: some text
I like this idea. I have started prefixing my prints with (EVT), If it
were built in it would be better.
>
> The name of the service allows easy filtering of the log for service
> specific states.
>
> After we do this we should consider instrumenting every api call to give
> more information to the logging as to what openais is doing during
> operation.
Good idea. Something that would be useful, would be to figure out a way
to have debug prints not cause membership timeouts and reconfiguring.
Mark.
>
> Regards,
> -steve
--
Mark Haverkamp <markh at osdl.org>
More information about the Openais
mailing list