[Openais] Much improved logging and configuration file support

Mark Haverkamp markh at osdl.org
Fri Oct 15 08:35:42 PDT 2004


On Thu, 2004-10-14 at 13:47 -0700, Steven Dake wrote:
> 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


I finally had  a chance to try this out.  It is very nice.  Seeing the
messages level and service type works well.  The one thing that I have
noticed that would make the conf file a little more intuitive, is if the
debug item would take 'off' as well as 'on'.  I had to look at the code
to see that 'on' was the only option and I had to comment out the line
to turn off debug.

Mark.

-- 
Mark Haverkamp <markh at osdl.org>




More information about the Openais mailing list