Is it possible to modify the logged url in the usual
modperl weblog via PerlLogHandler? I have tried this and
it does not seem to work:

$ cat Apache/MyLog.pm
package Apache::MyLog;
use Apache::Constants qw(:common);
sub handler {
        my $r = shift;
        my $uri=$r->uri;
        return DECLINED if ($r->filename !~ /foobar/);
        print STDERR "in MyLog handler, \$uri=$uri, modify it now\n";
        $r->uri('/foobar_changed');
        return OK;
}
1;

When this is installed like this:

<Location /perl>
PerlLogHandler Apache::MyLog
</Location>

I can see the debugging message in error_log but the url logged 
in the weblog is still the same as before.

Thanks for any info.

Richard

Reply via email to