On 2007-04-20T11:47:29, Simon Horman <[EMAIL PROTECTED]> wrote: > I sense that the first idea may be problematic. I'm not > sure that there is anything stopping syslog implementations from > having a private copy of the tag, in which case subsequent modifications > to the original buffer will have little effect.
This doesn't seem to be the case for any known syslog implementation, though. Yes, I agree it's ugly, but open/close is worse. > For these reason I'd go for the closelog/openlog option. Perhaps > it could be smart enough to only closelog/openlog if the tag > differers from the previous occasion that syslog was called. > I imagine that the performance penalty for this would be bearable, > but its just a guess. My gut feeling is that the penalty will be noticable in particular under load. > As for syslog, why on earth it doesn't give back a handle and thus > allow you to have multiple syslogs open simultaneously has baffled > me in the past. Because there's just one unix domain socket to write to, and that one is not atomic for several writes from one process. One might consider to use syslog over udp to localhost (or directly to a central log server, which we should encourage) - the network protocol is actually specified, and allows us to send it everything we want it to log with a preformatted line. I've got some old Perl code around - mon-syslog, a network syslog server with a mon interface, in case anyone is interested. > I guess another approach would be to fork of sysloging processes, > I guess then each process could open up syslog with a different tag, > and as long as you can IPC the logs to the relevant process, then > it should work. Just an idea. Not sure if its workable. Instead of having a central ha_logd, have each logging process spawn it's own shadow logger? That should also be workable and could be handled internally to the cl_log module as well. Off to vacation land! Sincerely, Lars -- Teamlead Kernel, SuSE Labs, Research and Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) "Experience is the name everyone gives to their mistakes." -- Oscar Wilde _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/