# Multiple excludes syslog.conf



## piercedfreak (Feb 12, 2014)

I know the !- is used to exclude from logging to a log file in the syslog.conf, but what about excluding multiple items from a log file?

I want to move pkg to its own file, and already have 1 exclude /var/log/messages.


```
!-spamassassin
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err   /var/log/messages
```


----------



## worldi (Feb 12, 2014)

> Multiple programs may be listed, separated by commas: `!prog1,prog2' matches messages from either program, while `!-prog1,prog2' matches all messages but those from `prog1' or `prog2'.
> 
> Source: syslog.conf()



Does this answer your question?


----------



## piercedfreak (Feb 12, 2014)

Thank you, that answered it, I must have overlooked the !- when I read over that.


----------

