[Cluster-devel] Re: clulog
Steven Dake
sdake at redhat.com
Tue May 15 18:13:57 UTC 2007
On Tue, 2007-05-08 at 08:52 +0200, Fabio M. Di Nitto wrote:
> Lon Hohberger wrote:
>
> >
> > Really - what we need is a better logging system. clulog is just a
> > wrapper around syslog.
>
> Yes exactly as some other log.c/.h that are around the tree.
>
> > Some of the features we really need are:
> >
> > * ring-buffer style (w/ a fixed max size)
> > * Remove oldest / lowest-prio log messages if we run out of
> > room
> > * option of guaranteed non-blocking logging
> >
> > clulog could be expanded and library-ified - esp. now that we have a
> > better / single build system.
> >
> > What I'd do is:
> >
> > * clulog_init(const char *facility, int mode, int severity)
> > MODE_SIMPLE - what we have now.
> > MODE_NONBLOCK - simple nonblocking syslog() calls. e.g. do what
> > syslog() does, but open the log device O_NONBLOCK; lossy.
> > MODE_RINGBUF - Non-blocking; fixed maximum memory footprint.
> > Clears lowest-prio / oldest log messages first if we fill up.
> >
> > etc... etc... I'll do more on this later.
>
> How would you feel if we first extract the code in its own library,
> switch all the subproject to it and then implement features?
>
> I think that in this way we will have to look at much less code than we
> have now.
>
> Thanks
> Fabio
>
Probably a bit late to this conversation, but I'd suggest taking a look
at openais logging (print.c, print.h, and wthread.{c|h}) since its
already a dependency of RHCS. We can library-ify (its pretty much
already a library) the logging system which is non blocking and drops
messages on overload and records that messages were dropped.
Regards
-steve
More information about the Cluster-devel
mailing list