pseudo-logrotate

Harald Becker ralda at gmx.de
Wed Jan 19 17:33:32 UTC 2011


 Hallo David!
> syslogd - can it be bent to my purpose in any way?
Why do you want do bent everything? Why don't you do/use the things the
way it is intended?

As soon as syslogd is started you can send every log information you
like to the system log. That is, what it is for, to log the process and
status information for later retrieval.

Use ...

logger -t TAGNAME "Your message"

... to send your information from within shell scripts to syslogd or use
the syslog() function within C programs.

The messages are written by syslogd to a bunch of message files (that is
rotated, to avoid overflowing your available space). And from there your
messages can simply be retrieved later on ...

grep TAGNAME MESSAGE_FILE_NAME

That's all you need to log information and retrieve it later for
examination. What's wrong with this way to do this message logging? You
do not need seperate logging processes hanging around. A single one does
it. You just need to learn how to use the existing tools (IMHO).

--
Harald



More information about the busybox mailing list