1Log::Dispatch::ApacheLoUgs(e3r)Contributed Perl DocumentLaotgi:o:nDispatch::ApacheLog(3)
2
3
4

NAME

6       Log::Dispatch::ApacheLog - Object for logging to Apache::Log objects
7

SYNOPSIS

9         use Log::Dispatch::ApacheLog;
10
11         my $handle = Log::Dispatch::ApacheLog->new( name      => 'apache log',
12                                                     min_level => 'emerg',
13                                                     apache    => $r );
14
15         $handle->log( level => 'emerg', message => 'Kaboom' );
16

DESCRIPTION

18       This module allows you to pass messages Apache's log object, repre‐
19       sented by the Apache::Log class.
20

METHODS

22       * new(%p)
23           This method takes a hash of parameters.  The following options are
24           valid:
25
26           * name ($)
27                   The name of the object (not the filename!).  Required.
28
29           * min_level ($)
30                   The minimum logging level this object will accept.  See the
31                   Log::Dispatch documentation on Log Levels for more informa‐
32                   tion.  Required.
33
34           * max_level ($)
35                   The maximum logging level this obejct will accept.  See the
36                   Log::Dispatch documentation on Log Levels for more informa‐
37                   tion.  This is not required.  By default the maximum is the
38                   highest possible level (which means functionally that the
39                   object has no maximum).
40
41           * apache ($)
42                   An object of either the Apache or Apache::Server classes.
43
44           * callbacks( \& or [ \&, \&, ... ] )
45                   This parameter may be a single subroutine reference or an
46                   array reference of subroutine references.  These callbacks
47                   will be called in the order they are given and passed a
48                   hash containing the following keys:
49
50                    ( message => $log_message, level => $log_level )
51
52                   The callbacks are expected to modify the message and then
53                   return a single scalar containing that modified message.
54                   These callbacks will be called when either the "log" or
55                   "log_to" methods are called and will only be applied to a
56                   given message once.
57
58       * log_message( message => $ )
59           Sends a message to the appropriate output.  Generally this
60           shouldn't be called directly but should be called through the
61           "log()" method (in Log::Dispatch::Output).
62

AUTHOR

64       Dave Rolsky, <autarch@urth.org>
65
66
67
68perl v5.8.8                       2006-12-20       Log::Dispatch::ApacheLog(3)
Impressum