Does syslog have an internal buffer?

Petter Reinholdtsen pere@hungry.com
Sun Aug 15 13:44:00 GMT 2004


[Dan Tihelka]
> I would like to ask you, if a syslog (in glibc library) has an
> internal buffer for a case that syslogd is not running. What does
> glibc, if it can not connect syslogd? (I found somewhere that the
> message is printed to console, but in my case it means that it is lost
> forever :-(( ).

There is no internal buffer in glibc for syslog messages.  It would
not make sense, as the programs syslogging might terminate before the
syslogd is available to receive any messages.

> What do you thing about an idea that syslog in glibc has a internal
> circular buffer of several kB of size; whenever the connection to
> syslogd was not successful the message would be stored into the
> buffer. If the connection is successful, whole buffer would be send to
> syslogd.
> Moreover it might be useful when syslogd crashes (although I do not
> suppose it :-)) or is restarted.

Interesting idea, but I'm not sure how useful it would be.  I
recommend starting syslogd sooner in the boot process instead.



More information about the Libc-alpha mailing list