On Wed, 21.10.15 10:05, Olaf Hering (o...@aepfle.de) wrote: > How can scripts which use "logger -t id --id=val" get "me[val]" into syslog? > This used to work, with a systemd based system it looks like this: > > root@probook:~ # journalctl -f & > root@probook:~ # logger -t "me" --no-act --stderr --id=$PPID "foo: blah" > <13>Oct 21 09:58:11 me[2606]: foo: blah > root@probook:~ # logger -t "me" --no-act --stderr --id=$PPID "foo: blah" > <13>Oct 21 09:58:13 me[2606]: foo: blah > root@probook:~ # logger -t "me" --id=$PPID "foo: blah" > root@probook:~ # Oct 21 10:02:33 probook.fritz.box me[2928]: foo: blah > logger -t "me" --id=$PPID "foo: blah" > root@probook:~ # Oct 21 10:02:34 probook.fritz.box me[2929]: foo: blah > > > I expect "me[2606]" to appear in "journalctl -f" output, but appearently the > id > is always replaced by the pid of logger. > How should a script look like to comply with systemd?
We do not allow faking syslog PID fields, for security reasons, it will always be set to what the kernel passed to journald. If this is something to support, then "logger" needs to to be patched so that it can fake the SCM_CREDENTIALS metadata of the messages sent. This requires privileges, but is not hard to do. Please file a bug against util-linux and ask for for this to be added. Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel