Hi all,
I'm running a web app on Apache 2.2 with the usual access_log enabled. For privacy reasons, I'd like to remove specific parts from some URLs before they're written to the log (i.e., post-processing the logs is not an option). I made a small perl script along the lines of
$|=1; # unbuffered writes
open(LOG, ">> ${ARGV[0]}") or die $!;
while (<STDIN>) {
s/filter/stuff/;
print LOG $_;
}
and added it to Apache using
CustomLog "|/usr/bin/perl /path/to/filter.pl /path/to/access_log" combined
Is there any catch on this?
Thanks, Simon