The PerlLogFile directive from this package can be used to hook a Perl file handle to a piped logger or to a file open for appending. If the first character of the filename is a "|", the file handle is opened as a pipe to the given program. The file or program can be relative to the ServerRoot.
So if httpd.conf contains these settings:
PerlModule Apache::LogFile PerlLogFile |perl/mylogger.pl My::Logger
in your code you can log to the My::Logger file handle:
print My::Logger "a message to the Log"
and it'll be piped through the perl/mylogger.pl script.
Available from CPAN. See the module manpage for more information.
 
Continue to: