Re: Disable logging to /var/log/messages
Posted: Sat Apr 02, 2011 9:51 pm
Great piece of information I have been meaning to do this for sometime and luckily found it through google. I would like to use it on Ubuntu 9.10 running syslog-ng 2.x. Using the following lines:
generates the zoneminder.log file.
But using the following line
makes no difference to /var/log/messages as the zoneminder messages keep on logging to it also.
I cannot figure out what I am doing wrong.
Edit:
I figured it out. Actually it was a silly mistake on my part Zoneminder was logging its messages to /var/log/syslog and not /var/log/messages. I edited the wrong filter in syslog-ng.conf; it should have been f_syslog instead of f_messages.
Code: Select all
filter f_zm { match("^zm.*"); };
destination zm { file("/var/log/zoneminder.log"); };
log { source(s_all); filter(f_zm); destination(zm); };
But using the following line
Code: Select all
filter f_messages {
level(info,notice,warn)
and not facility(auth,authpriv,cron,daemon,mail,news)
and not filter(f_zm);
};
I cannot figure out what I am doing wrong.
Edit:
I figured it out. Actually it was a silly mistake on my part Zoneminder was logging its messages to /var/log/syslog and not /var/log/messages. I edited the wrong filter in syslog-ng.conf; it should have been f_syslog instead of f_messages.