Labrador::Crawler::AccessLog
use Labrador::Crawler::AccessLog;
my $logger = new Labrador::Crawler::AccessLog(data => $data);
$logger->log();
Customisable access logger, which when allows custom formats for log entries to be created, similar to the way Apache allows.
- SpiderAccessLog
-
The filename to save the Access log file to. Must be aboslute at the moment. (TODO)
- SpiderAccessLogFormat
-
The format with which to save the log file entry.
%a
-
Remote IP address
%A
-
Remote hostname
%d
-
localtime standard date/time scalar format
%M
-
MD5 base64 fingerprint of the uncompressed data
%f
-
Filename
%p
-
Remote port
%T
-
Time taken to make request
%t
-
Current epoch time from time
%m
-
Request method
%q
-
Querystring
%U
-
Entire URL requested
%u
-
URI of request
%s
-
HTTP status code
%S
-
Protocol scheme (eg http, https)
%r
-
Referring URL
%c
-
Size of content downloaded uncompressed (excluding headers)
%C
-
Size of content downloaded compressed (excluding headers)
%P
-
PID of requesting crawler
%H
-
Hostname of the requesting crawler
- new(data=> $data)
-
Constuct new object
- init()
-
Initialises this module (called by new()).
- log($HTTPrequest, $HTTPresponse, \$data, $deltatime)
-
Log a request and response for the crawler to the log file with the configured format.
- parse()
-
Converts a charatcter from the log formatting into a sprintf
compatable number, such that it can be found in the stack of
formatting clauses values passed to sprintf.
$Revision: 1.11 $