From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio M. Di Nitto Date: Tue, 08 May 2007 08:52:37 +0200 Subject: [Cluster-devel] Re: clulog In-Reply-To: <20070507181012.GE29015@redhat.com> References: <20070507181012.GE29015@redhat.com> Message-ID: <46401E35.6070108@ubuntu.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 -- I'm going to make him an offer he can't refuse.