[CentOS] syslog.conf - how to redirect messages by a program name?

Mon Mar 21 21:20:26 UTC 2011
Kenneth Porter <shiva at sewingwitch.com>

--On Sunday, March 20, 2011 11:58 AM -0400 Nico Kadel-Garcia 
<nkadel at gmail.com> wrote:

> And if you've got a tweaked, older syslog.conf, you can usually just
> install it as rsyslog.conf and it will work the way it used to.

I just switched on my C5.5 system and it was almost completely painless. 
Append syslog.conf to rsyslog.conf, stop and disable syslog ("service stop 
syslog" "chkconfig syslog off"), then start and enable rsyslog (both can be 
installed together).

Redirect program output with a rule like this, placed above your copied 
syslog.conf directives:

:programname, startswith, "drupal" -/var/log/drupal
&~

Remember to add additional log files to /etc/logrotate.d/syslog.