Linux – How to change log level in /var/log/messages

linuxloggingsuse

I'm running SUSE Linux Enterprise Server 10, SP2 (SLES10 SP2), and am seeing a large number of what support calls cosmetic errors being logged to /var/log/messages.

Does anyone know of a way to change the log level in the /var/log/messages file?

Best Answer

Sure, edit /etc/syslog.conf (or /etc/rsyslog.conf depending on distro). There's a line

*.=info;*.=notice;*.=warning;\
    auth,authpriv.none;\
    cron,daemon.none;\
    mail,news.none      -/var/log/messages

remove *.=notice or *.=info or tweak it as you want.

$ man syslog.conf

will give you all the options you can use.

Don't forget to restart syslog daemon for changes to take effect.

Related Question