NAME
Apache::LogFile - Interface to Apache's logging routines
SYNOPSIS
#in a startup file
use Apache::LogFile ();
Apache::LogFile->new("|perl/mylogger.pl", "MyLogger");
#in a request-time file
use Apache::LogFile ();
my $fh = Apache::LogFile->handle("MyLogger");
print $fh "a message to the log";
DESCRIPTION
The new
method should be called by a server startup script or module. It will create a new log file or open a pipe to a program if the first character of the filename is a |
. The last argument to new
is optional, it is simply a name that can be used to retrive the filehandle via the handle
method. If this argument is not present, the filename will be used the handle key, which can also be retrived via the handle
method. The new
method will return a reference to the filehandle if you wish to store it elsewhere, e.g.:
$MyLog::Pipe = Apache::LogFile->new("|perl/mylogger.pl");
$MyLog::Append = Apache::LogFile->new("logs/my_log");
Filenames can be absolute or relative to ServerRoot.
AUTHOR
Doug MacEachern
SEE ALSO
Apache(3), mod_perl(3)