.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Catalyst::Log::Log4perl 3pm" .TH Catalyst::Log::Log4perl 3pm "2012-06-21" "perl v5.18.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Catalyst::Log::Log4perl \- DEPRECATED (see Log::Log4perl::Catalyst) .SH "SYNOPSIS" .IX Header "SYNOPSIS" In MyApp.pm: .PP .Vb 1 \& use Catalyst::Log::Log4perl; \& \& # then we create a custom logger object for catalyst to use. \& # If we don\*(Aqt supply any arguments to new, it will work almost \& # like the default catalyst\-logger. \& \& _\|_PACKAGE_\|_\->log(Catalyst::Log::Log4perl\->new()); \& \& # But the real power of Log4perl lies in the configuration, so \& # lets try that. example.conf is included in the distribution, \& # alongside the README and Changes. \& \& _\|_PACKAGE_\|_\->log(Catalyst::Log::Log4perl\->new(\*(Aqexample.conf\*(Aq)); .Ve .PP And later... .PP .Vb 1 \& $c\->log\->debug("This is using log4perl!"); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module provides a Catalyst::Log implementation that uses Log::Log4perl as the underlying log mechanism. It provides all the methods listed in Catalyst::Log, with the exception of: .PP .Vb 3 \& levels \& enable \& disable .Ve .PP These methods simply return 0 and do nothing, as similar functionality is already provided by Log::Log4perl. .PP These methods will all instantiate a logger with the component set to the package who called it. For example, if you were in the MyApp::C::Main package, the following: .PP .Vb 1 \& package MyApp::C::Main; \& \& sub default : Private { \& my ( $self, $c ) = @_; \& my $logger = $c\->log; \& $logger\->debug("Woot!"); \& } .Ve .PP Would send a message to the Myapp.C.Main Log::Log4perl component. .PP See Log::Log4perl for more information on how to configure different logging mechanisms based on the component. .SH "METHODS" .IX Header "METHODS" .IP "new($config, [%options])" 4 .IX Item "new($config, [%options])" This builds a new Catalyst::Log::Log4perl object. If you provide an argument to \fInew()\fR, it will be passed directly to Log::Log4perl::init. .Sp The second (optional) parameter is a hash with extra options. Currently three additional parameters are defined: .Sp .Vb 2 \& \*(Aqautoflush\*(Aq \- Set it to a true value to disable abort(1) support. \& \*(Aqwatch_delay\*(Aq \- Set it to a true value to use L\*(Aqs init_and_watch \& \& \*(Aqoverride_cspecs\*(Aq \- EXPERIMENTAL \& Set it to a true value to locally override some parts of \& L. See L below .Ve .Sp Without any arguments, \fInew()\fR will initialize a root logger with a single appender, Log::Log4perl::Appender::Screen, configured to have an identical layout to the default Catalyst::Log object. .IP "\fI_flush()\fR" 4 .IX Item "_flush()" Flushes the cache. Much like the way Catalyst::Log does it. .IP "abort($abort)" 4 .IX Item "abort($abort)" Causes the current log-object to not log anything, effectivly shutting up this request, making it disapear from the logs. .IP "debug($message)" 4 .IX Item "debug($message)" Passes it's arguments to \f(CW$logger\fR\->debug. .IP "info($message)" 4 .IX Item "info($message)" Passes it's arguments to \f(CW$logger\fR\->info. .IP "warn($message)" 4 .IX Item "warn($message)" Passes it's arguments to \f(CW$logger\fR\->warn. .IP "error($message)" 4 .IX Item "error($message)" Passes it's arguments to \f(CW$logger\fR\->error. .IP "fatal($message)" 4 .IX Item "fatal($message)" Passes it's arguments to \f(CW$logger\fR\->fatal. .IP "\fIis_debug()\fR" 4 .IX Item "is_debug()" Calls \f(CW$logger\fR\->is_debug. .IP "\fIis_info()\fR" 4 .IX Item "is_info()" Calls \f(CW$logger\fR\->is_info. .IP "\fIis_warn()\fR" 4 .IX Item "is_warn()" Calls \f(CW$logger\fR\->is_warn. .IP "\fIis_error()\fR" 4 .IX Item "is_error()" Calls \f(CW$logger\fR\->is_error. .IP "\fIis_fatal()\fR" 4 .IX Item "is_fatal()" Calls \f(CW$logger\fR\->is_fatal. .IP "\fIlevels()\fR" 4 .IX Item "levels()" This method does nothing but return \*(L"0\*(R". You should use Log::Log4perl's built in mechanisms for setting up log levels. .IP "\fIenable()\fR" 4 .IX Item "enable()" This method does nothing but return \*(L"0\*(R". You should use Log::Log4perl's built in mechanisms for enabling log levels. .IP "\fIdisable()\fR" 4 .IX Item "disable()" This method does nothing but return \*(L"0\*(R". You should use Log::Log4perl's built in mechanisms for disabling log levels. .SH "OVERRIDING CSPECS" .IX Header "OVERRIDING CSPECS" Due to some fundamental design incompatibilities of Log::Log4perl and Catalyst::Log all cspecs of Log::Log4perl::Layout::PatternLayout that rely on call stack information fail to work as expected. Affected are the format strings \f(CW%L\fR, \f(CW%F\fR, \f(CW%C\fR, \f(CW%M\fR, \f(CW%l\fR and \f(CW%T\fR. You can instruct \&\fBCatalyst::Log::Log4perl\fR to try to hijack these patterns which seems to work reasonable well, but be advised that this feature is \s-1HIGHLY EXPERIMENTAL\s0 and relies on a few internals of Log::Log4perl that might change in later versions of this library. Additionally, this feature is currently only tested with Log::Log4perl version 1.08 allthough the underlying internals of Log::Log4perl seem to be stable since at least version 0.47. .SH "BUGS AND LIMITATIONS" .IX Header "BUGS AND LIMITATIONS" The \f(CW%T\fR cspec of Log::Log4perl::Layout::PatternLayout is currently unimplemented. The implementation to get \f(CW%M\fR defies any logical approach but seems to work perfectly. .SH "SEE ALSO" .IX Header "SEE ALSO" Log::Log4perl, Catalyst::Log, Catalyst. .SH "AUTHORS" .IX Header "AUTHORS" Adam Jacob, \f(CW\*(C`adam@stalecoffee.org\*(C'\fR .PP Andreas Marienborg, \f(CW\*(C`omega@palle.net\*(C'\fR .PP Gavin Henry, \f(CW\*(C`ghenry@suretecsystems.com\*(C'\fR (Typos) .PP Sebastian Willert (Overriding \s-1CSPECS\s0) .PP J. Shirley \f(CW\*(C`jshirley@gmail.com\*(C'\fR (Adding _dump) .PP Tomas Doran (t0m) \f(CW\*(C`bobtfish@bobtfish.net\*(C'\fR (Current maintainer) .PP Wallace Reis (wreis) \f(CW\*(C`wreis@cpan.org\*(C'\fR .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2005 \- 2009 the Catalyst::Log::Log4perl \*(L"\s-1AUTHORS\*(R"\s0 as listed above. .SH "LICENSE" .IX Header "LICENSE" This library is free software. You can redistribute it and/or modify it under the same terms as perl itself.