You are not logged in.
Pages: 1
can i configure pacman to use the systemd journal instead of /var/log/pacman.log?
Offline
Why do you want to do this?
Offline
can i configure pacman to use the systemd journal instead of /var/log/pacman.log?
Not via pacman.conf. You can patch pacman to use syslog instead of a stand-alone lg file (although I don't see why this would be useful). Then journal will capture the output.
Having said that, doing so would be a bad idea because:
(1) Pacman can be run when no syslog is running, e.g. in a chroot or when you install the system.
(2) systemd journal is prone to corruption during crashes. If a system crash happens during package installation, with a plain-text pacman.log at lease you know what packages were installed, but with journald, you can reboot to a corrupted journal and then good luck recovering ![]()
(3) Sometimes, you'll get corrupted journals after a major systemd update. At least I get those pretty often, but it's OK since journal files are only in /run/log. Now, pacman's log has to be persistent, so having it corrupted is not an option.
(4) The log of pacman operations doesn't follow the same lifecycle as other log files. You don't want it to be rotated at the same rate as other logs.
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
ok, you guys talked me out of it. i thought it would be convenient to have everything in one place, but sounds like i would sacrifice reliability and troubleshooting.
Offline
Please remember to mark the thread as solved https://bbs.archlinux.org/viewtopic.php?id=130309
Offline
thenewguy wrote:can i configure pacman to use the systemd journal instead of /var/log/pacman.log?
Not via pacman.conf. You can patch pacman to use syslog instead of a stand-alone lg file (although I don't see why this would be useful). Then journal will capture the output.
Having said that, doing so would be a bad idea because:
(1) Pacman can be run when no syslog is running, e.g. in a chroot or when you install the system.
(2) systemd journal is prone to corruption during crashes. If a system crash happens during package installation, with a plain-text pacman.log at lease you know what packages were installed, but with journald, you can reboot to a corrupted journal and then good luck recovering
(3) Sometimes, you'll get corrupted journals after a major systemd update. At least I get those pretty often, but it's OK since journal files are only in /run/log. Now, pacman's log has to be persistent, so having it corrupted is not an option.
(4) The log of pacman operations doesn't follow the same lifecycle as other log files. You don't want it to be rotated at the same rate as other logs.
Yes, via pacman.conf. Just uncomment "UseSyslog". pacman will output to syslog, but also still write pacman.log. All of those concerns are void.
Actually, I'd like to see it enabled by default.
Last edited by heftig (2014-12-06 00:52:42)
Offline
Ah, yes :facepalm: you are right. Apparently I haven't had a look into pacman manpage for a while... Sorry for the wrong info ![]()
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
Pages: 1