From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lon Hohberger Date: Mon, 7 May 2007 14:10:12 -0400 Subject: [Cluster-devel] clulog Message-ID: <20070507181012.GE29015@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit [10:56:21] lon: you around? ----- [11:00] ----- [11:01:39] ok no biggies.. i need to run to a meeting now [11:02:17] idea: make clulog a shared standalone library, remove a bunch of custom log.h/.c like the one in ccs and make them use clulog lib [11:02:33] i have notice that most of them do the exact same thing with different name [11:02:37] == code reduction [11:02:50] more clean and elegant than reimplement * each time [11:03:03] just think about it.. we can talk next time we are both online [11:03:08] * fabbione takes off Really - what we need is a better logging system. clulog is just a wrapper around syslog. 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. -- Lon -- Lon Hohberger - Software Engineer - Red Hat, Inc.