I'm trying to setup some custom logging including
the whole User/Session tracking thing. The problem that I'm encountering is how
to log for the page that was requested and ignore all the additional files that
may be included in the page. I.e. graphics. Without trying to maintain session
uniqueness by comparing mod_uniqueid values.
return DECLINED unless($r->is_main()); does
nothing
return DECLINED unless($r->is_initial_req());
does nothing
PerlFixupHandler logs every included file (is this
what a subrequest is?)
PerlLogHandler logs every included
file
PerlHandler only logs the initial request, but only
logs for the / URI request. No other URI's are logged.
my $code = <<EO_CODE_SAMPLE;
sub handler {
my $r = shift; open TRACK,
">>/usr/local/www/usertracker.txt" or die "Couldn't open log:
$!";
print TRACK join("\t",($r->hostname,$r->uri,scalar(localtime),$r->connection->remote_ip,$r->connection->hostname || '-' ,$r->header_in('Referer') || '-',$r->header_in('User-agent'))),"\n"; close TRACK; return DECLINED; } EO_CODE_SAMPLE
|
- Re: Custom Logging and User Tracking Ryan Parr
- Re: Custom Logging and User Tracking Ask Bjoern Hansen
- Re: Custom Logging and User Tracking Ryan Parr
- Re: Custom Logging and User Tracking Ask Bjoern Hansen
- Re: Custom Logging and User Tracking Ryan Parr
- Re: Custom Logging and User Track... Dave Rolsky
- Re: Custom Logging and User T... Ryan Parr
- Re: Custom Logging and Us... Ryan Parr
- Re: Custom Logging and Us... masta
- Re: Custom Logging and User Track... Per Einar Ellefsen