[Catalyst-commits] r14116 - trunk/Catalyst-Log-Log4perl
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Tue Sep 27 18:09:38 GMT 2011
Author: t0m
Date: 2011-09-27 18:09:38 +0000 (Tue, 27 Sep 2011)
New Revision: 14116
Modified:
trunk/Catalyst-Log-Log4perl/Changes
trunk/Catalyst-Log-Log4perl/MANIFEST.SKIP
trunk/Catalyst-Log-Log4perl/Makefile.PL
trunk/Catalyst-Log-Log4perl/README
Log:
Version 1.05
Modified: trunk/Catalyst-Log-Log4perl/Changes
===================================================================
--- trunk/Catalyst-Log-Log4perl/Changes 2011-09-27 18:05:02 UTC (rev 14115)
+++ trunk/Catalyst-Log-Log4perl/Changes 2011-09-27 18:09:38 UTC (rev 14116)
@@ -1,6 +1,6 @@
Revision history for Catalyst::Log::Log4perl
-1.05
+1.05 Tue Oct 27 19:08:00 BST 2011
- DEPRECATED in favor of Log::Log4perl::Catalyst
1.04 Sun Oct 18 19:00:00 BST 2009
Modified: trunk/Catalyst-Log-Log4perl/MANIFEST.SKIP
===================================================================
--- trunk/Catalyst-Log-Log4perl/MANIFEST.SKIP 2011-09-27 18:05:02 UTC (rev 14115)
+++ trunk/Catalyst-Log-Log4perl/MANIFEST.SKIP 2011-09-27 18:09:38 UTC (rev 14116)
@@ -10,6 +10,9 @@
^blib/
^MakeMaker-\d
+^MYMETA\.
+^Catalyst-Log-Log4perl-
+
# Temp, old and emacs backup files.
~$
\.old$
Modified: trunk/Catalyst-Log-Log4perl/Makefile.PL
===================================================================
--- trunk/Catalyst-Log-Log4perl/Makefile.PL 2011-09-27 18:05:02 UTC (rev 14115)
+++ trunk/Catalyst-Log-Log4perl/Makefile.PL 2011-09-27 18:09:38 UTC (rev 14116)
@@ -6,6 +6,12 @@
readme_from;
resources repository => 'http://dev.catalyst.perl.org/repos/Catalyst/trunk/historical/Catalyst-Log-Log4perl';
+requires( 'Catalyst' => '5.60' );
+requires( 'Log::Log4perl' => '1.04');
+requires( 'Params::Validate' => 0 );
+requires( 'Data::Dump' => 0 );
+requires( 'MRO::Compat' => 0 );
+
test_requires 'Test::More';
auto_include;
Modified: trunk/Catalyst-Log-Log4perl/README
===================================================================
--- trunk/Catalyst-Log-Log4perl/README 2011-09-27 18:05:02 UTC (rev 14115)
+++ trunk/Catalyst-Log-Log4perl/README 2011-09-27 18:09:38 UTC (rev 14116)
@@ -1,6 +1,27 @@
NAME
Catalyst::Log::Log4perl - DEPRECATED (see Log::Log4perl::Catalyst)
+SYNOPSIS
+ In MyApp.pm:
+
+ use Catalyst::Log::Log4perl;
+
+ # then we create a custom logger object for catalyst to use.
+ # If we don't 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('example.conf'));
+
+ And later...
+
+ $c->log->debug("This is using log4perl!");
+
DESCRIPTION
This module provides a Catalyst::Log implementation that uses
Log::Log4perl as the underlying log mechanism. It provides all the
@@ -30,8 +51,95 @@
See Log::Log4perl for more information on how to configure different
logging mechanisms based on the component.
+METHODS
+ new($config, [%options])
+ This builds a new Catalyst::Log::Log4perl object. If you provide an
+ argument to new(), it will be passed directly to
+ Log::Log4perl::init.
+
+ The second (optional) parameter is a hash with extra options.
+ Currently three additional parameters are defined:
+
+ 'autoflush' - Set it to a true value to disable abort(1) support.
+ 'watch_delay' - Set it to a true value to use L<Log::Log4perl>'s init_and_watch
+
+ 'override_cspecs' - EXPERIMENTAL
+ Set it to a true value to locally override some parts of
+ L<Log::Log4perl::Layout::PatternLayout>. See L<OVERRIDING CSPECS> below
+
+ Without any arguments, new() 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.
+
+ _flush()
+ Flushes the cache. Much like the way Catalyst::Log does it.
+
+ abort($abort)
+ Causes the current log-object to not log anything, effectivly
+ shutting up this request, making it disapear from the logs.
+
+ debug($message)
+ Passes it's arguments to $logger->debug.
+
+ info($message)
+ Passes it's arguments to $logger->info.
+
+ warn($message)
+ Passes it's arguments to $logger->warn.
+
+ error($message)
+ Passes it's arguments to $logger->error.
+
+ fatal($message)
+ Passes it's arguments to $logger->fatal.
+
+ is_debug()
+ Calls $logger->is_debug.
+
+ is_info()
+ Calls $logger->is_info.
+
+ is_warn()
+ Calls $logger->is_warn.
+
+ is_error()
+ Calls $logger->is_error.
+
+ is_fatal()
+ Calls $logger->is_fatal.
+
+ levels()
+ This method does nothing but return "0". You should use
+ Log::Log4perl's built in mechanisms for setting up log levels.
+
+ enable()
+ This method does nothing but return "0". You should use
+ Log::Log4perl's built in mechanisms for enabling log levels.
+
+ disable()
+ This method does nothing but return "0". You should use
+ Log::Log4perl's built in mechanisms for disabling log levels.
+
+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 %L, %F, %C, %M, %l and %T. You can instruct
+ Catalyst::Log::Log4perl to try to hijack these patterns which seems to
+ work reasonable well, but be advised that this feature is HIGHLY
+ EXPERIMENTAL 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.
+
+BUGS AND LIMITATIONS
+ The %T cspec of Log::Log4perl::Layout::PatternLayout is currently
+ unimplemented. The implementation to get %M defies any logical approach
+ but seems to work perfectly.
+
SEE ALSO
- Log::Log4perl, Log::Log4perl::Catalyst, Catalyst::Log, Catalyst.
+ Log::Log4perl, Catalyst::Log, Catalyst.
AUTHORS
Adam Jacob, "adam at stalecoffee.org"
@@ -44,12 +152,12 @@
J. Shirley "jshirley at gmail.com" (Adding _dump)
- Tomas Doran (t0m) "bobtfish at bobtfish.net"
+ Tomas Doran (t0m) "bobtfish at bobtfish.net" (Current maintainer)
- Wallace Reis (wreis) "wreis at cpan.org" (Current maintainer)
+ Wallace Reis (wreis) "wreis at cpan.org"
COPYRIGHT
- Copyright (c) 2005 - 2011 the Catalyst::Log::Log4perl "AUTHORS" as
+ Copyright (c) 2005 - 2009 the Catalyst::Log::Log4perl "AUTHORS" as
listed above.
LICENSE
More information about the Catalyst-commits
mailing list