Skip to content

Instantly share code, notes, and snippets.

@ralph-tice
Created April 8, 2013 20:31
Show Gist options
  • Save ralph-tice/5340216 to your computer and use it in GitHub Desktop.
Save ralph-tice/5340216 to your computer and use it in GitHub Desktop.
httpd.conf: CustomLog |/usr/local/bin/pipe_syslog combined
#!/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