Created
April 8, 2013 20:31
-
-
Save ralph-tice/5340216 to your computer and use it in GitHub Desktop.
httpd.conf:
CustomLog |/usr/local/bin/pipe_syslog combined
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment