The default log viewer application that comes with Ubuntu, Mint etc, is called gnome-system-log. Sometimes it tries to display logs which don’t exist and comes up with an error, eg: “Error when getting information for file ‘/var/log/mail.log’: No such file or directory”. However there is no obvious way to clear this message and stop it trying to load these logs in the future.
After a few minutes following dead ends on the internet, I decided to figure out where the config file was held. This information can also be used to add logs as well as remove them.
So apt-cache wasn’t much use, and dpgk-query also failed me. Nothing in .conf, .gnome, .gnome2 … grr.
The source code? No clues. lsof. Nope.
Aha. Now we’re getting somewhere: ‘gsettings list-recursively org.gnome.gnome-system-log‘
So this command gets the current value: ‘gsettings get org.gnome.gnome-system-log logfiles‘
eg: [‘/var/log/auth.log’, ‘/var/log/dpkg.log’, ‘/var/log/mail.log’, ‘/var/log/syslog’, ‘/var/log/dmesg’, ‘/var/log/boot.log’, ‘/var/log/kern.log’]
So edit that list accordingly and then use the following to set it, not forgetting the double quotes around the long bracketed string.
gsettings set org.gnome.gnome-system-log logfiles “[‘/var/log/auth.log’, …etc… ‘/var/log/kern.log’]”
Jeez, why was that so complicated. Any chance of adding a Preferences panel in there?