Re: syslog.conf - how to redirect messages by a program name?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



centos-bounces@xxxxxxxxxx wrote:
> Hello,
> 
> the "man syslog.conf" explains how to filter syslog messages
> 
> But how could I redirect messages by a program name, like
> "drupal" or "php"?  I would like them to go under /var/log/drupal

This 1-liner script needs fired off at system boot.
tail --follow=name --retry /var/log/messages | grep drupal: >
/var/log/drupal

The grep patters might be expanded -E "(drupal|php)"

Insert spiffy .sig here:
Life is complex: it has both real and imaginary parts.

//me
*******************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed. If you have received this email in error please
notify the system manager. This footnote also confirms that this
email message has been swept for the presence of computer viruses.
www.Hubbell.com - Hubbell Incorporated**

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux