1POE::Component::Log4perUls(e3r)Contributed Perl DocumentPaOtEi:o:nComponent::Log4perl(3)
2
3
4

NAME

6       POE::Component::Log4perl - Perl extension for the POE Environemt
7

SYNOPSIS

9         use POE::Component::Log4perl;
10
11         POE::Component::Log4perl->spawn(
12            Alias => 'logger',
13            Category => 'default',
14            ConfigFile => 'logging.conf',
15            GetLogfile => \&get_logfile,
16         );
17

DESCRIPTION

19       Well, just what everybody needs, another logging module for the POE
20       environment. This one will encapsulate the Log4perl modules to do the
21       logging.
22
23       This modules understands the following parameters:
24
25        Alias      - The alias for the session
26        Category   - The category to use from the configuration file
27        ConfigFile - The name of the configuration file
28        GetLogfile - This points to a function to return the logfile name
29
30       A word about the "GetLogfile" parameter. In my environment, I use a
31       single centralized configuration file to handle the logging
32       environment. This makes management a bit easier. Log4perl allows this
33       to happen by using a callback to your main routine to retrieve the
34       filename. The GetLogfile allows you to name the function to handle that
35       task. The function name should match the one in the configuration file.
36       If you don't use this ability then you can safely ignore this
37       parameter.
38

EVENTS

40       info
41           This event will insert an "INFO" line into your logfile.
42
43           Example
44                $poe_kernel->post('logger' => info => 'my cool message');
45
46       warn
47           This event will insert a "WARN" line into your logfile.
48
49       error
50           This event will insert an "ERROR" line into your logfile.
51
52       fatal
53           This event will insert a "FATAL" line into your logfile.
54
55           Example
56                $poe_kernel->post('logger' => fatal => 'bad mojo');
57                $poe_kernel->yield('shutdown');
58
59       debug
60           This event will insert a "DEBUG" line into your logfile.
61

SEE ALSO

63        Log::Log4perl
64        POE::Component::Logger
65        POE::Component::SimpleLogger
66

AUTHOR

68       Kevin L. Esteb, <kesteb@wsipc.org>
69
71       Copyright (C) 2007 by Kevin L. Esteb
72
73       This library is free software; you can redistribute it and/or modify it
74       under the same terms as Perl itself, either Perl version 5.8.8 or, at
75       your option, any later version of Perl 5 you may have available.
76
77
78
79perl v5.12.0                      2009-10-04       POE::Component::Log4perl(3)
Impressum