From: Steven Dake Date: Tue, 15 May 2007 11:13:57 -0700 Subject: [Cluster-devel] Re: clulog In-Reply-To: <46401E35.6070108@ubuntu.com> References: <20070507181012.GE29015@redhat.com> <46401E35.6070108@ubuntu.com> Message-ID: <1179252837.32185.4.camel@shih.broked.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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