Last active
December 22, 2015 22:59
-
-
Save ralph-tice/6543615 to your computer and use it in GitHub Desktop.
rsyslog testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Sys::Syslog qw( :DEFAULT setlogsock ); | |
setlogsock('unix'); | |
openlog('apache', 'cons', 'pid', 'local2'); | |
while ($log = <STDIN>) { | |
syslog('notice', $log); | |
} | |
closelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ModLoad imuxsock # provides support for local system logging | |
$IncludeConfig /etc/rsyslog.d/*.conf | |
local2,local2.* /var/log/local2.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment