1JavaMap(3)            User Contributed Perl Documentation           JavaMap(3)
2
3
4

NAME

6       Log::Log4perl::JavaMap - maps java log4j appenders to Log::Dispatch
7       classes
8

SYNOPSIS

10            ###############################
11            log4j.appender.FileAppndr1        = org.apache.log4j.FileAppender
12            log4j.appender.FileAppndr1.File   = /var/log/onetime.log
13            log4j.appender.FileAppndr1.Append = false
14
15            log4j.appender.FileAppndr1.layout = org.apache.log4j.PatternLayout
16            log4j.appender.FileAppndr1.layout.ConversionPattern=%d %4r [%t] %-5p %c %x - %m%n
17            ###############################
18

DESCRIPTION

20       If somebody wants to create an appender called
21       "org.apache.log4j.ConsoleAppender", we want to translate it to
22       Log::Dispatch::Screen, and then translate the log4j options into
23       Log::Dispatch parameters..
24
25   What's Implemented
26       (Note that you can always use the Log::Dispatch::* module.  By
27       'implemented' I mean having a translation class that translates log4j
28       options into the Log::Dispatch options so you can use log4j rather than
29       log4perl syntax in your config file.)
30
31       Here's the list of appenders I see on the current (6/2002) log4j site.
32
33       These are implemented
34
35           ConsoleAppender     - Log::Dispatch::Screen
36           FileAppender        - Log::Dispatch::File
37           RollingFileAppender - Log::Dispatch::FileRotate (by Mark Pfeiffer)
38           JDBCAppender        - Log::Log4perl::Appender::DBI
39           SyslogAppender      - Log::Dispatch::Syslog
40           NTEventLogAppender  - Log::Dispatch::Win32EventLog
41
42       These should/will/might be implemented
43
44           DailyRollingFileAppender -
45           SMTPAppender     - Log::Dispatch::Email::MailSender
46
47       These might be implemented but they don't have corresponding classes in
48       Log::Dispatch (yet):
49
50           NullAppender
51           TelnetAppender
52
53       These might be simulated
54
55           LF5Appender - use Tk?
56           ExternallyRolledFileAppender - catch a HUP instead?
57
58       These will probably not be implemented
59
60           AsyncAppender
61           JMSAppender
62           SocketAppender - (ships a serialized LoggingEvent to the server side)
63           SocketHubAppender
64

ROLL YOUR OWN

66       Let's say you've in a mixed Java/Perl environment and you've come up
67       with some custom Java appender with behavior you want to use in both
68       worlds, "myorg.customAppender".  You write a Perl appender with the
69       same behavior "Myorg::CustomAppender". You want to use one config file
70       across both applications, so the config file will have to say
71       'myorg.customAppender'.  But the mapping from "myorg.customAppender" to
72       "Myorg::CustomAppender" isn't in this JavaMap class, so what do you do?
73
74       In  your Perl code, before you call Log::Log4perl::init(), do this:
75
76           $Log::Log4perl::JavaMap::user_defined{'myorg.customAppender'} =
77               'Myorg::CustomAppender';
78
79       and you can use 'myorg.customAppender' in your config file with
80       impunity.
81

SEE ALSO

83       http://jakarta.apache.org/log4j/docs/
84

LICENSE

86       Copyright 2002-2013 by Mike Schilli <m@perlmeister.com> and Kevin Goess
87       <cpan@goess.org>.
88
89       This library is free software; you can redistribute it and/or modify it
90       under the same terms as Perl itself.
91

AUTHOR

93       Please contribute patches to the project on Github:
94
95           http://github.com/mschilli/log4perl
96
97       Send bug reports or requests for enhancements to the authors via our
98
99       MAILING LIST (questions, bug reports, suggestions/patches):
100       log4perl-devel@lists.sourceforge.net
101
102       Authors (please contact them via the list above, not directly): Mike
103       Schilli <m@perlmeister.com>, Kevin Goess <cpan@goess.org>
104
105       Contributors (in alphabetical order): Ateeq Altaf, Cory Bennett, Jens
106       Berthold, Jeremy Bopp, Hutton Davidson, Chris R. Donnelly, Matisse
107       Enzer, Hugh Esco, Anthony Foiani, James FitzGibbon, Carl Franks, Dennis
108       Gregorovic, Andy Grundman, Paul Harrington, Alexander Hartmaier  David
109       Hull, Robert Jacobson, Jason Kohles, Jeff Macdonald, Markus Peter,
110       Brett Rann, Peter Rabbitson, Erik Selberg, Aaron Straup Cope, Lars
111       Thegler, David Viner, Mac Yang.
112
113
114
115perl v5.34.0                      2021-07-22                        JavaMap(3)
Impressum