Intro to Apache - ApacheCon
Piped log handlers
  • Specify a script, rather than a log file.

    
        CustomLog "|/usr/local/bin/logprocess.pl" common
    
      

  • logprocess.pl would look like ...

    
        #!/usr/bin/perl
    
      
    
        while (my $log = <STDIN>) {
            DoSomethingWith($log);
        }
    
      

  • Where sub DoSomethingWith( ) logs to a database, or writes to a file, or emails you summary data, or something.

Index
Back to Log file statistics
Forward to Error logs

ApacheCon : Intro to Apache - Slide #134 of 139