Disable logging to /var/log/messages

Support and queries relating to all previous versions of ZoneMinder
Khurram
Posts: 46
Joined: Tue Oct 09, 2007 5:29 pm
Location: Lahore, Pakistan

Re: Disable logging to /var/log/messages

Post by Khurram »

Great piece of information :D 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:

Code: Select all

filter f_zm { match("^zm.*"); };
destination zm { file("/var/log/zoneminder.log"); };
log { source(s_all); filter(f_zm); destination(zm); };
generates the zoneminder.log file.

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);
};
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 :oops: 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.
Locked