issues using NOT in an filter.
Hello all, I can't seem to figure this out. I want to log level(info) and facility(authpriv) to my messages file, but I don't want to see facility(local4). Now some of the facility(local4) messages are level(info) but I still don't want them. Anyway, I was trying something like this and it doesn't work: filter f_messages { (level(info) or facility(authpriv)) not facility(local4); }; I tried using () to clean it up and that doesn't work. In all of the combinations I tried it simply will not parse the config file with NOT in the filter unless I put an and in front of it like this: "and not" Anyone have a sec to help me out with this? Thanks, schu
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Anyway, I was trying something like this and it doesn't work:
filter f_messages { (level(info) or facility(authpriv)) not facility(local4); };
Your suggestion should work: filter f_messages { (level(info) or facility(authpriv)) and (not facility(local4)); }; Or, you might break it apart: filter f_info_authpriv { level(info) or facility(authpriv); }; filter f_not_local4 { not facility(local4); }; log { source (s_1); filter (f_not_local4); filter (f_info_authpriv); destination (d_1); }; -MNi -----BEGIN PGP SIGNATURE----- Version: PGP 7.0 iQA/AwUBO+ZD8UXQWDVhHgF9EQI9CgCg7rRXY8MthTcDipCh+/SJB1K8DigAniXH 7Z/PvNIVfmu66DhEU5qaDmtU =xOzn -----END PGP SIGNATURE-----
participants (2)
-
Matthew Schumacher
-
Mikko Niskanen