You are not logged in.
Does anybody know how I can log a message to a per-user journal without using a per-user systemd service (~/.config/systemd/user/something.service)?
As root, I can run:
echo This is a test. | systemd-cat -t test
or:
echo This is a test. | logger -t test
and see the logged message with:
journalctl --since='-300' -e
or:
journalctl --since='-300' -et test
As a non-root user, I can see the logs of per-user systemd services, among other things, with:
journalctl --user --since=today
I'm unable, however, to find a way to see the output of using systemd-cat or logger as a user, and when I use those commands, the timestamp of the user journal file in /var/log/journal doesn't change, so I don't think the journal is actually being written.
Any ideas?
Offline
Apparently I can do so as some users but not others.
For example:
echo This is a test. | sudo -u http systemd-cat -t test
allows me to see the entry in the journal, but:
echo This is a test. | sudo -u somenewuser systemd-cat -t test
doesn't.
Offline