Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm just setting up snoopy logger on my personal machine to archive commands I've run.

I'm attempting to setup an rsyslog rule to move its messages from /var/log/auth.log to /var/log/snoopy.log

I've tried a few different rsyslog rules to move the output, but after resetting the rsyslog service it's still logging to auth.log

~$ cat /etc/rsyslog.d/snoopy.conf

#if $programname == 'snoopy' then /var/log/snoopy.log
#& ~
:programname, isequal, "snoopy" /var/log/snoopy.log

Could it be that the rule in /etc/rsyslog.d/50-default.conf

auth,authpriv.* /var/log/auth.log

Is overriding any rule I specify?

share|improve this question
up vote 0 down vote accepted

I renamed the file such that it was loaded earlier than the auth rule, and added & ~ to stop messages that match this rule being used in other rules.

~$ cat /etc/rsyslog.d/10-snoopy.conf

:programname, isequal, "snoopy" /var/log/snoopy.log
& ~
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.