I am asking what may be a simple question before diving into the source code to see if the answer is out there: Is the /var/log/journal
location for systemd journal files hard-coded into the binaries? By that, I do not mean "is it the default?" I mean that I have attempted to override the default in every location I could find which might control the setting, and systemd-journald
merrily ignores those settings and goes back to the /var/log/journal
location. Or stop logging altogether. These locations include:
/etc/systemd/journald.conf
/usr/lib/tmpfiles.d/systemd.conf
/usr/lib/tmpfiles.d/var.conf
/lib/systemd/system/systemd-journal-flush.service
Am I missing a configuration setting somewhere? The distro is Ubuntu 16.04. System design constraints prompt the question, so please, no "Why in world would you ever..." type answers. Thanks.
Yes, it’s hard-coded. /usr/lib/tmpfiles.d/systemd.conf
sets up the directory (via the systemd-tmpfiles
service), but journald doesn’t check there to see what the directory should be. Also, you shouldn’t edit files in /usr/lib/
anyways – all systemd services support an override mechanism that doesn’t require editing files which belong to the package manager (e. g. /etc/tmpfiles.d/systemd.conf
can be used to completely override /usr/lib/tmpfiles.d/systemd.conf
).