Re: syslog

From: Olivier <Olivier.Nicole_at_cs.ait.ac.th>
Date: Wed, 05 Apr 2023 12:34:17 UTC
Doug Hardie <bc979@lafn.org> writes:

> I am writing a program that I would like to log some messages with LOG_DEBUG,
> and others with LOG_INFO and LOG_MAIL. I have tried openlog before each of
> them with the right facilities and levels, but some of the messages are
> simply dropped. It appears to change between invocations weather the debug or
> mail messages are dropped. Is there a way to do this?

It may be that the messages are received by syslog, but syslog decides
that they are not important enough and just don't save them on disk.

If you look at /etc/syslog.conf, you will see that many info messages do
not make it to the disk.

One solution would be to edit the config of syslog to log *.*

You can also test various messages with logger(1) manually, varying the
facility and priority.

Olivier