[systemd-devel] Prefix for direct logging

Arjun D R drarjun95 at gmail.com
Mon Sep 27 10:10:57 UTC 2021


Hi Folks,

Currently we are using systemd-journald for service logging. We run
journalctl for a bunch of services and redirect those to the custom log
files for every few seconds. This takes up the CPU for that particular
time period since we have lot of IO operations as well. We came to know
that systemd version v236+ supports direct logging
(StandardOutput:file:<log_file>) to the custom log file by the service. I
would like to use that facility but we don't get the prefix that we used to
get when using the journal.

Is there a way to prepare a custom patch locally to add the necessary
prefix to the stdout before writing to the custom log file? Is that a good
idea? Any other suggestions?

Thanks in advance for your help,
Arjun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20210927/b560aa21/attachment.htm>


More information about the systemd-devel mailing list