SamQi has asked for the wisdom of the Perl Monks concerning the following question:
It opens each file that it is supposed to, but then none of the log entries get written. I decided to do some testing of my own and wrote this:CustomLog "|/opt/apache/logs/split-logfiles" combined
And when I put that into apache instead of split-logfiles, it does the same thing: /var/tmp/test.log gets created but none of the log entries get put into it. When I tried printing to STDERR instead of MYHAPPYFILE, it showed up fine in the error log. Any ideas?#!/usr/bin/perl $isopen = 0; while ($log_line = <STDIN>) { $myfile = "/var/tmp/test.log"; unless($isopen and -f $myfile) { open MYHAPPYFILE, ">$myfile" or die "Error opening $myfile"; $isopen = 1; } printf MYHAPPYFILE "%s", $log_line; } exit 0;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Apache log pipe doesn't write to log files
by trs80 (Priest) on Nov 10, 2002 at 06:57 UTC | |
Re: Apache log pipe doesn't write to log files
by chromatic (Archbishop) on Nov 10, 2002 at 06:52 UTC | |
Re: Apache log pipe doesn't write to log files
by SamQi (Beadle) on Nov 10, 2002 at 06:07 UTC | |
by BrowserUk (Patriarch) on Nov 10, 2002 at 06:44 UTC | |
by Aristotle (Chancellor) on Nov 10, 2002 at 15:29 UTC | |
by BrowserUk (Patriarch) on Nov 10, 2002 at 20:37 UTC | |
by SamQi (Beadle) on Nov 10, 2002 at 06:55 UTC |