How to install and enable syslog

Hello

How do I install and enable syslog ?

I installed the latest Ubuntu Core 18 and I noticed syslog was disabled.

I think it was from this issue: Allow disabling system services on Ubuntu Core

With core18 syslog was removed from the core(18) snap. Ubuntu Core defaults to only using systemd-journald now so “sudo journalctl” is your friend :slight_smile:

In case you need to log to a persistent file you can do:

sudo mkdir /etc/systemd/journald.conf.d
echo "Storage=persistent" | sudo tee -a /etc/systemd/journald.conf.d/persistent.conf
sudo mkdir /var/log/journal
sudo systemctl restart systemd-journald
$ ls /var/log/journal/
a61c37bb24374940b499a2076166e1c6

And in case you want to log to a central log server you can follow: