[Openais] Much improved logging and configuration file support

Steven Dake sdake at mvista.com
Thu Oct 14 13:47:07 PDT 2004


Folks

I've been working quite a bit on improving the logging and configuration
of openais.  I'll commit this patch in the next few days if there are no
further comments.

I merged network.conf and logging configuration into openais.conf.  The
new openais.conf file looks like:

[sdake at persist conf]$ more openais.conf
network {
        bindnetaddr: 192.168.1.0
        mcastaddr: 226.94.1.1
        mcastport: 5405
}

logging {
        logoutput: file
        logoutput: stderr
        logoutput: syslog
        logfile: /tmp/ais
        debug: on
        timestamp: on
}

The new logging prints out lines that look like this :
Oct 14  6:34:25 [DEBUG   ] [EVT  ] Remote channel operation request
Oct 14  6:34:25 [DEBUG   ] [EVT  ] Receive EVT_CONF_DONE from 5d01a8c0
Oct 14  6:34:25 [NOTICE  ] [GMI  ] All services unplugged, unplugging
processor
Oct 14  6:34:25 [DEBUG   ] [GMI  ] releasing messages up to and
including 2

The logging supports the ability to:
* select a file for logging
* select syslog for logging
* select stderr for logging
* turn on logging of DEBUG log_printfs
* timestamp logged messages

Thanks to all of the discussion on the mailing list about this subject. 
We had talked about ensuring that the token isn't lost with lots of log
messages.  This may be possible immediately by turning off stderr
logging (especially if running over serial connection).  In the future
we can buffer messages and log them only when the token isn't in
posession.

The patch also improves error detection of configurations a little bit
(ie missing bindnetaddr or mcastaddr or mcastport, or specifying
logoutput to file without specifying a filename).

Comments welcome
-steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: defect-145-2.patch
Type: text/x-patch
Size: 40067 bytes
Desc: not available
Url : http://lists.linux-foundation.org/pipermail/openais/attachments/20041014/68210f21/defect-145-2-0001.bin


More information about the Openais mailing list