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

Paul Richards paulrichards321 at gmail.com
Sat Aug 4 19:29:40 PDT 2012


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

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.

On Thu, Aug 2, 2012 at 7:06 AM, Kay Sievers <kay at vrfy.org> wrote:
> On Thu, Aug 2, 2012 at 12:43 PM, David Strauss <david at davidstrauss.net> wrote:
>> On Wed, Aug 1, 2012 at 8:57 PM, Paul Richards <paulrichards321 at gmail.com> wrote:
>>> 2. My main question: The logging isn't making it into
>>> /var/log/messages or into dmesg.
>
> *Into* dmesg? We do not forward stuff to the kernel buffer by default.
> 'Dmesg' only contains kernel messages usually, the journal can forward
> all stuff to dmesg, with a kernel command line option, but that is
> more for debugging or special purpose setups, and not a default.
>
>> I can only see it with journalctl. Is
>>> there anywhere to fix that? My target system is Fedora 17 vanilla that
>>> runs rsyslog.
>>
>> It's not really Fedora 17 vanilla if you use rsyslog instead of the
>> systemd journal. :-)
>
> The journal will not try to write the old syslog files, if they are
> needed/expected for anything, a syslog daemon needs to run in parallel
> to the journal.
>
> It will likely be that way also in future products, the journal will
> unlikely ever cover plain text files or any aspect of the original
> syslog network protocol.
>
>> Are you trying to disable the journal entirely? You should try
>> disabling the journal service and checking out the Fedora 16 syslog
>> setup, which uses rsyslog with socket activation.
>
> The running journal process is not supposed to be disabled. It needs
> to run, at least in the current vesion; it's an expected-to-always-run
> core part of systemd like udev.
>
> The journal can be instructed though, to not store anything on disk,
> or in recent version not store anything at all, but just forward
> messages to a syslog daemon. But as said, it needs to run to be able
> to do that.
>
> Kay


More information about the systemd-devel mailing list