[systemd-devel] Need help with getting messages into /var/log/messages

Kay Sievers kay at vrfy.org
Sun Aug 5 10:15:16 PDT 2012


On Sun, Aug 5, 2012 at 4:29 AM, Paul Richards <paulrichards321 at gmail.com> wrote:
> I'm trying to make this into a rpm package so that I can continue to
> tell my users to look into /var/log/messages for logging results of my
> program on bootup.
>
> I tried the:
>
> After=syslog.target

That's not needed, syslog is always available. It does not mean syslog
in the sense of /var/log/messages, but a working libc syslog() call.

> in the service file but that had no effect. Is there a way tell
> systemd to pass the message to the syslog daemon so that it can record
> the changes to /var/log/messages?
>
> However...
>
> (In response to Kay Sievers, and anyone else listening...)
>
> Correct me if your wrong, It seems like you are saying or hinting it
> is advisable to tell anyone who installs my package from now on that
> they should just use journalctl if they want to see the logging
> results.

It depends on the system/distribution. If you install syslog on
systemd systems, you also get the /var/log/messages file, if you do
not install syslog there is only the journal logging data.

We focus entirely on systems without a running syslog daemon by
default. Syslog is then only available if the old plain text files are
needed for whatever reason, or if the syslog network protocol is used,
the default system logging is the journal on systems that use systemd.

So it's not so much a question of the package or its service file,
it's more a question how the base operating system is
built/installed/configured where the package is installed on.

Kay


More information about the systemd-devel mailing list