[Openais] Re: openais and syslog

Steven Dake sdake at mvista.com
Wed Oct 6 12:35:54 PDT 2004


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
}

# logging configuration
log {
	type:file (or syslog or stderr)
	filename:/var/log/openais.log
	timestamp:yes (or 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

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.

Regards,
-steve




More information about the Openais mailing list