I have a Tomato router and it has the capability to have its logs go to a external server.
syslog is the obvious choice for this. So I enabled remote logging on my linux server's
syslogd -r) and I can see all of the logs in
/var/log/syslog. What I want to do is take everything that comes from the IP of my router (10.0.0.1) and divert it to its own file like
/var/log/tomato to avoid polluting my syslog with external logs.
I can't find any examples of someone doing this. My only solution is to get a script together that strips out any line in
10.0.0.1 in it and puts the line into
/var/log/tomato and have the script run as a cron job, but that seems unnecessarily messy.
There's got to be a better way.
Unless someone knows that there is a solution, I'm 95% sure that
syslog doesn't support this after reading more in-depth of the man page. So I need to migrate to
syslog-ng or make a crazy script that runs with cron.