diff -Nru libmoosex-log-log4perl-perl-0.46/Changes libmoosex-log-log4perl-perl-0.47/Changes --- libmoosex-log-log4perl-perl-0.46/Changes 2012-06-27 18:46:50.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/Changes 2015-12-08 18:07:16.000000000 +0000 @@ -1,4 +1,5 @@ Revision history for MooseX::Log::Log4perl + * RT#82888: Refactor to use Moo instead of Any::Moose (Alexander Hartmaier) 0.46 Wed Jun 27 2012 (rl) * RT#77451: Spelling mistake in Easy.pm (thanks gregoa@debian.org) @@ -14,7 +15,7 @@ * Fix wrong META.yml file 0.43 Thu Aug 25 2011 (rl) - * Change to use Any::Moose to also support Mouse environemnt + * Change to use Any::Moose to also support Mouse environment * Documentation improvements for Any::Moose 0.42 Thu Apr 29 2010 (again) diff -Nru libmoosex-log-log4perl-perl-0.46/debian/changelog libmoosex-log-log4perl-perl-0.47/debian/changelog --- libmoosex-log-log4perl-perl-0.46/debian/changelog 2012-06-30 15:40:32.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/debian/changelog 2015-12-10 18:17:39.000000000 +0000 @@ -1,3 +1,27 @@ +libmoosex-log-log4perl-perl (0.47-1) unstable; urgency=low + + [ Salvatore Bonaccorso ] + * Change Vcs-Git to canonical URI (git://anonscm.debian.org) + * Change search.cpan.org based URIs to metacpan.org based URIs + + [ gregor herrmann ] + * Strip trailing slash from metacpan URLs. + + [ Salvatore Bonaccorso ] + * Update Vcs-Browser URL to cgit web frontend + + [ gregor herrmann ] + * Add debian/upstream/metadata. + * Import upstream version 0.47. + * Update years of upstream and packaging copyright. + * Update (build) dependencies. + * Mark package as autopkgtest-able. + * Declare compliance with Debian Policy 3.9.6. + * Bump debhelper compatibility level to 9. + * Add patch to improve POD. + + -- gregor herrmann Thu, 10 Dec 2015 19:17:33 +0100 + libmoosex-log-log4perl-perl (0.46-1) unstable; urgency=low * New upstream release. diff -Nru libmoosex-log-log4perl-perl-0.46/debian/compat libmoosex-log-log4perl-perl-0.47/debian/compat --- libmoosex-log-log4perl-perl-0.46/debian/compat 2012-06-30 15:40:32.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/debian/compat 2015-12-10 18:17:39.000000000 +0000 @@ -1 +1 @@ -8 +9 diff -Nru libmoosex-log-log4perl-perl-0.46/debian/control libmoosex-log-log4perl-perl-0.47/debian/control --- libmoosex-log-log4perl-perl-0.46/debian/control 2012-06-30 15:40:32.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/debian/control 2015-12-10 18:17:39.000000000 +0000 @@ -1,31 +1,31 @@ Source: libmoosex-log-log4perl-perl +Maintainer: Debian Perl Group +Uploaders: Alejandro Garrido Mota , + Ryan Niebur , + Jonathan Yu , + gregor herrmann Section: perl +Testsuite: autopkgtest-pkg-perl Priority: optional -Build-Depends: debhelper (>= 8) +Build-Depends: debhelper (>= 9) Build-Depends-Indep: perl, - libany-moose-perl, - libio-stringy-perl, - liblog-log4perl-perl, - libmoose-perl, - libtest-pod-coverage-perl, - libtest-pod-perl -Maintainer: Debian Perl Group -Uploaders: Alejandro Garrido Mota , - Ryan Niebur , - Jonathan Yu , - gregor herrmann -Standards-Version: 3.9.3 -Homepage: http://search.cpan.org/dist/MooseX-Log-Log4perl/ -Vcs-Git: git://git.debian.org/pkg-perl/packages/libmoosex-log-log4perl-perl.git -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libmoosex-log-log4perl-perl.git + libio-stringy-perl, + liblog-log4perl-perl, + libmoo-perl (>= 1.000007), + libtest-pod-coverage-perl, + libtest-pod-perl +Standards-Version: 3.9.6 +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libmoosex-log-log4perl-perl.git +Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libmoosex-log-log4perl-perl.git +Homepage: https://metacpan.org/release/MooseX-Log-Log4perl Package: libmoosex-log-log4perl-perl Architecture: all -Depends: ${misc:Depends}, ${perl:Depends}, - libany-moose-perl, - libio-stringy-perl, - liblog-log4perl-perl -Recommends: libmoose-perl +Depends: ${misc:Depends}, + ${perl:Depends}, + libio-stringy-perl, + liblog-log4perl-perl, + libmoo-perl (>= 1.000007) Description: logging role for Moose based on Log::Log4perl MooseX::Log::Log4perl is a Perl module that provides a Moose role, built on Log::Log4perl, for use with your Moose classes. The initialization of the diff -Nru libmoosex-log-log4perl-perl-0.46/debian/copyright libmoosex-log-log4perl-perl-0.47/debian/copyright --- libmoosex-log-log4perl-perl-0.46/debian/copyright 2012-06-30 15:40:32.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/debian/copyright 2015-12-10 18:17:39.000000000 +0000 @@ -1,10 +1,10 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: MooseX-Log-Log4perl Upstream-Contact: Roland Lammel -Source: http://search.cpan.org/dist/MooseX-Log-Log4perl/ +Source: https://metacpan.org/release/MooseX-Log-Log4perl Files: * -Copyright: 2008-2012, Roland Lammel +Copyright: 2008-2016, Roland Lammel License: Artistic or GPL-1+ Files: inc/Module/* @@ -17,7 +17,7 @@ Copyright: 2009, Alejandro Garrido Mota 2009, Ryan Niebur 2010, Jonathan Yu - 2011-2012, gregor herrmann + 2011-2015, gregor herrmann License: Artistic or GPL-1+ License: Artistic @@ -35,4 +35,3 @@ . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. - diff -Nru libmoosex-log-log4perl-perl-0.46/debian/patches/series libmoosex-log-log4perl-perl-0.47/debian/patches/series --- libmoosex-log-log4perl-perl-0.46/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/debian/patches/series 2015-12-10 18:17:39.000000000 +0000 @@ -0,0 +1 @@ +wording.patch diff -Nru libmoosex-log-log4perl-perl-0.46/debian/patches/wording.patch libmoosex-log-log4perl-perl-0.47/debian/patches/wording.patch --- libmoosex-log-log4perl-perl-0.46/debian/patches/wording.patch 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/debian/patches/wording.patch 2015-12-10 18:17:39.000000000 +0000 @@ -0,0 +1,18 @@ +Description: improve wording in POD +Origin: vendor +Author: gregor herrmann +Last-Update: 2015-12-10 +Forwarded: https://rt.cpan.org/Ticket/Display.html?id=110272 +Bug: https://rt.cpan.org/Ticket/Display.html?id=110272 + +--- a/lib/MooseX/Log/Log4perl.pm ++++ b/lib/MooseX/Log/Log4perl.pm +@@ -92,7 +92,7 @@ + + As this module is using L, you can use it with Moo instead of Moose too. + +-This will allow to simple use it as documented above in a Moo based application, like shown in the example below: ++This will allow you to simple use it as documented above in a Moo based application, like shown in the example below: + + This is your class consuming the MooseX::Log::Log4perl role. + diff -Nru libmoosex-log-log4perl-perl-0.46/debian/upstream/metadata libmoosex-log-log4perl-perl-0.47/debian/upstream/metadata --- libmoosex-log-log4perl-perl-0.46/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/debian/upstream/metadata 2015-12-10 18:17:39.000000000 +0000 @@ -0,0 +1,5 @@ +--- +Archive: CPAN +Contact: Roland Lammel +Name: MooseX-Log-Log4perl +Repository: https://github.com/lammel/moosex-log-log4perl diff -Nru libmoosex-log-log4perl-perl-0.46/debian/watch libmoosex-log-log4perl-perl-0.47/debian/watch --- libmoosex-log-log4perl-perl-0.46/debian/watch 2012-06-30 15:40:32.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/debian/watch 2015-12-10 18:17:39.000000000 +0000 @@ -1,2 +1,2 @@ version=3 -http://search.cpan.org/dist/MooseX-Log-Log4perl/ .*/MooseX-Log-Log4perl-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ +https://metacpan.org/release/MooseX-Log-Log4perl .*/MooseX-Log-Log4perl-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ diff -Nru libmoosex-log-log4perl-perl-0.46/inc/Module/AutoInstall.pm libmoosex-log-log4perl-perl-0.47/inc/Module/AutoInstall.pm --- libmoosex-log-log4perl-perl-0.46/inc/Module/AutoInstall.pm 2012-06-27 18:05:33.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/inc/Module/AutoInstall.pm 2015-12-08 18:07:16.000000000 +0000 @@ -28,7 +28,7 @@ $PostambleActionsListAllDeps, $PostambleUsed, $NoTest); # See if it's a testing or non-interactive session -_accept_default( $ENV{AUTOMATED_TESTING} or ! -t STDIN ); +_accept_default( $ENV{AUTOMATED_TESTING} or ! -t STDIN ); _init(); sub _accept_default { @@ -433,7 +433,7 @@ $conf->set_conf( makeflags => $makeflags ); $conf->set_conf( prereqs => 1 ); - + while ( my ( $key, $val ) = splice( @config, 0, 2 ) ) { $conf->set_conf( $key, $val ); @@ -769,7 +769,7 @@ # check for version numbers that are not in decimal format if ( ref($cur) or ref($min) or $cur =~ /v|\..*\./ or $min =~ /v|\..*\./ ) { if ( ( $version::VERSION or defined( _load('version') )) and - version->can('new') + version->can('new') ) { # use version.pm if it is installed. diff -Nru libmoosex-log-log4perl-perl-0.46/lib/MooseX/Log/Log4perl/Easy.pm libmoosex-log-log4perl-perl-0.47/lib/MooseX/Log/Log4perl/Easy.pm --- libmoosex-log-log4perl-perl-0.46/lib/MooseX/Log/Log4perl/Easy.pm 2012-06-27 18:47:40.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/lib/MooseX/Log/Log4perl/Easy.pm 2015-12-08 20:29:47.000000000 +0000 @@ -1,10 +1,10 @@ package MooseX::Log::Log4perl::Easy; -use Any::Moose 'Role'; +use Moo::Role; with 'MooseX::Log::Log4perl'; -our $VERSION = '0.46'; +our $VERSION = '0.47'; sub log_fatal { local $Log::Log4perl::caller_depth += 1; return shift->logger->fatal(@_); } sub log_error { local $Log::Log4perl::caller_depth += 1; return shift->logger->error(@_); } @@ -30,7 +30,7 @@ with 'MooseX::Log::Log4perl::Easy'; BEGIN { - Log::Log4perl->easy_init(); + Log::Log4perl->easy_init(); } sub foo { @@ -42,16 +42,17 @@ =head1 DESCRIPTION -The Easy logging role based on the L logging role for Moose directly adds the -logmethods for all available levels to your class instance. Hence it is possible to use +The "Easy" logging role based on the L logging role for +Moose directly adds the log methods for all available levels to your class +instance. Hence it is possible to use $self->log_info("blabla"); without having to access a separate log attribute as in MooseX::Log::Log4perl; -In case your app grows and you need more of the super-cow powers of Log4perl or simply don't want the additional -methods to clutter up your class you can simply replace all code C<< $self->log_LEVEL >> with -C<< $self->log->LEVEL >>. +In case your app grows and you need more of the super-cow powers of Log4perl or +simply don't want the additional methods to clutter up your class you can simply +replace all code C<< $self->log_LEVEL >> with C<< $self->log->LEVEL >>. You can use the following regex substitution to accomplish that: @@ -105,28 +106,15 @@ =head1 SEE ALSO -L, L, L - -=head1 BUGS AND LIMITATIONS - -Please report any bugs or feature requests to -C, or through the web interface at -L. - -Or come bother us in C<#moose> on C. +L =head1 AUTHOR Roland Lammel C<< >> -Inspired by suggestions by Michael Schilli C<< >> - -Contributions from Tim Bunce C<< >> - =head1 LICENSE AND COPYRIGHT -Copyright (c) 2008-2012, Roland Lammel C<< >>, http://www.quikit.at +Copyright (c) 2008-2016, Roland Lammel L<< >>, http://www.quikit.at This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L. - diff -Nru libmoosex-log-log4perl-perl-0.46/lib/MooseX/Log/Log4perl.pm libmoosex-log-log4perl-perl-0.47/lib/MooseX/Log/Log4perl.pm --- libmoosex-log-log4perl-perl-0.46/lib/MooseX/Log/Log4perl.pm 2012-06-27 18:47:32.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/lib/MooseX/Log/Log4perl.pm 2015-12-08 20:31:04.000000000 +0000 @@ -1,14 +1,13 @@ package MooseX::Log::Log4perl; use 5.008; -use Any::Moose 'Role'; +use Moo::Role; use Log::Log4perl; -our $VERSION = '0.46'; +our $VERSION = '0.47'; has 'logger' => ( is => 'rw', - isa => 'Log::Log4perl::Logger', lazy => 1, default => sub { return Log::Log4perl->get_logger(ref($_[0])) } ); @@ -37,9 +36,9 @@ package MyApp; use Moose; - + with 'MooseX::Log::Log4perl'; - + sub something { my ($self) = @_; $self->log->debug("started bar"); ### logs with default class catergory "MyApp" @@ -52,7 +51,7 @@ =head1 DESCRIPTION -A logging role building a very lightweight wrapper to L for use with your L classes. +A logging role building a very lightweight wrapper to L for use with your L or L classes. The initialization of the Log4perl instance must be performed prior to logging the first log message. Otherwise the default initialization will happen, probably not doing the things you expect. @@ -63,7 +62,7 @@ package MyClass; use Moose; with 'MooseX::Log::Log4perl'; - + sub dummy { my $self = shift; $self->log->info("Dummy log entry"); @@ -74,9 +73,9 @@ package main; use Log::Log4perl qw(:easy); use MyClass; - + BEGIN { Log::Log4perl->easy_init() }; - + my $myclass = MyClass->new(); $myclass->log->info("In my class"); # Access the log of the object $myclass->dummy; # Will log "Dummy log entry" @@ -89,19 +88,19 @@ $self->log_info("Dummy"); -=head1 USING WITH MOUSE INSTEAD OF MOOSE +=head1 USING WITH MOO INSTEAD OF MOOSE -As this module is using L, you can use it with Mouse instead of Moose too. +As this module is using L, you can use it with Moo instead of Moose too. -This will allow to simple use it as documented above in a Mouse based application, like shown in the example below: +This will allow to simple use it as documented above in a Moo based application, like shown in the example below: This is your class consuming the MooseX::Log::Log4perl role. package MyCat; - use Mouse; - + use Moo; + with 'MooseX::Log::Log4perl'; - + sub catch_it { my $self = shift; $self->log->debug("Say Miau"); @@ -113,7 +112,7 @@ use MyCat; use Log::Log4perl qw(:easy); BEGIN { Log::Log4perl->easy_init() }; - + my $log = Log::Log4perl->get_logger(); $log->info("Application startup..."); MyCat->new()->catch_it(); ### Will log "Dummy dodo" @@ -154,22 +153,20 @@ =head1 SEE ALSO -L, L, L +L, L, L, L, L =head1 BUGS AND LIMITATIONS -Please report any bugs or feature requests to -C, or through the web interface at -L. +Please report any issues at L Or come bother us in C<#moose> on C. =head1 AUTHOR -Roland Lammel C<< >> +Roland Lammel L<< >> -Inspired by the work by Chris Prather C<< >> and Ash -Berlin C<< >> on L +Inspired by the work by Chris Prather L<< >> and Ash +Berlin L<< >> on L =head1 CONTRIBUTORS @@ -177,16 +174,19 @@ =over 2 -=item Michael Schilli C<< >> for L and suggestions in the interface. +=item * abraxxa for Any::Moose deprectation + +=item * Michael Schilli for L and interface suggestions -=item Tim Bunce C<< >> for corrections in the L module. +=item * omega for catgory prefix support + +=item * Tim Bunce for corrections in the L module. =back =head1 LICENSE AND COPYRIGHT -Copyright (c) 2008-2012, Roland Lammel C<< >>, http://www.quikit.at +Copyright (c) 2008-2016, Roland Lammel L<< >>, L This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L. - diff -Nru libmoosex-log-log4perl-perl-0.46/Makefile.PL libmoosex-log-log4perl-perl-0.47/Makefile.PL --- libmoosex-log-log4perl-perl-0.46/Makefile.PL 2012-06-27 18:05:33.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/Makefile.PL 2015-12-08 20:15:18.000000000 +0000 @@ -5,13 +5,10 @@ build_requires 'IO::Scalar'; build_requires 'Test::More'; -build_requires 'Moose' => '0.65'; -requires 'Any::Moose' => '0.12'; +requires 'Moo' => '1.000007'; requires 'Log::Log4perl' => '1.13'; -recommends 'Moose' => '0.65'; - license 'perl'; auto_install; diff -Nru libmoosex-log-log4perl-perl-0.46/META.yml libmoosex-log-log4perl-perl-0.47/META.yml --- libmoosex-log-log4perl-perl-0.46/META.yml 2012-06-27 18:51:04.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/META.yml 2015-12-08 20:47:16.000000000 +0000 @@ -3,31 +3,30 @@ author: - 'Roland Lammel ' build_requires: - ExtUtils::MakeMaker: 6.57 - IO::Scalar: 0 - Moose: 0.65 - Test::More: 0 + ExtUtils::MakeMaker: '6.59' + IO::Scalar: '0' + Test::More: '0' configure_requires: - ExtUtils::MakeMaker: 6.57 -distribution_type: module + ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'Module::Install version 1.06' +generated_by: 'Module::Install version 1.06, CPAN::Meta::Converter version 2.150005' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 + version: '1.4' name: MooseX-Log-Log4perl no_index: directory: - inc - t recommends: - Moose: 0.65 + Moose: '0.65' requires: - Any::Moose: 0.12 - Log::Log4perl: 1.13 - perl: 5.8.0 + Log::Log4perl: '1.13' + Moo: '1.000007' + perl: '5.008' resources: license: http://dev.perl.org/licenses/ repository: https://github.com/lammel/moosex-log-log4perl -version: 0.46 +version: '0.47' +x_serialization_backend: 'CPAN::Meta::YAML version 0.016' diff -Nru libmoosex-log-log4perl-perl-0.46/README libmoosex-log-log4perl-perl-0.47/README --- libmoosex-log-log4perl-perl-0.46/README 2012-06-27 18:05:33.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/README 2015-12-08 21:00:51.000000000 +0000 @@ -1,34 +1,170 @@ -MooseX-Log-Log4perl version 0.45 +NAME +---- -INSTALLATION + MooseX::Log::Log4perl - A Logging Role for Moose based on Log::Log4perl -To install this module, run the following commands: +SYNOPSIS +-------- - perl Makefile.PL - make - make test - make install + package MyApp; + use Moose; + with 'MooseX::Log::Log4perl'; -Alternatively, to install with Module::Build, you can use the following commands: + sub something { + my ($self) = @_; + $self->log->debug("started bar"); ### logs with default class catergory "MyApp" + ... + $self->log('special')->info('bar'); ### logs with category "special" + ... + $self->log('.special')->info('bar'); ### logs with category "MyApp.special" + $self->log('::special')->info('bar');### logs with category "MyApp.special" + } - perl Build.PL - ./Build - ./Build test - ./Build install +DESCRIPTION +----------- +A logging role building a very lightweight wrapper to Log::Log4perl for +use with your Moose or Moo classes. The initialization of the Log4perl +instance must be performed prior to logging the first log message. +Otherwise the default initialization will happen, probably not doing the +things you expect. +For compatibility the "logger" attribute can be accessed to use a common +interface for application logging. -DEPENDENCIES +Using the logger within a class is as simple as consuming a role: -- Any::Moose -- Moose or Mouse -- Log::Log4perl + package MyClass; + use Moose; + with 'MooseX::Log::Log4perl'; + sub dummy { + my $self = shift; + $self->log->info("Dummy log entry"); + } -COPYRIGHT AND LICENSE +The logger needs to be setup before using the logger, which could happen +in the main application: -Copyright (C) 2008-2012, Roland Lammel + package main; + use Log::Log4perl qw(:easy); + use MyClass; -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. + BEGIN { Log::Log4perl->easy_init() }; + + my $myclass = MyClass->new(); + $myclass->log->info("In my class"); # Access the log of the object + $myclass->dummy; # Will log "Dummy log entry" + +EVEN SIMPLER USE +---------------- + +For simple logging needs use MooseX::Log::Log4perl::Easy to directly add +log_ methods to your class instance. + + $self->log_info("Dummy"); + +USING WITH MOO INSTEAD OF MOOSE +------------------------------- + +As this module is using Moo, you can use it with Moo instead of Moose too. +This will allow to simple use it as documented above in a Moo based application, +like shown in the example below: + +This is your class consuming the MooseX::Log::Log4perl role. + + package MyCat; + use Moo; + + with 'MooseX::Log::Log4perl'; + + sub catch_it { + my $self = shift; + $self->log->debug("Say Miau"); + } + +Which can be simply used in your main application then. + + package main; + use MyCat; + use Log::Log4perl qw(:easy); + BEGIN { Log::Log4perl->easy_init() }; + + my $log = Log::Log4perl->get_logger(); + $log->info("Application startup..."); + MyCat->new()->catch_it(); ### Will log "Dummy dodo" + +ACCESSORS +--------- + +### logger + +The "logger" attribute holds the Log::Log4perl object that implements all +logging methods for the defined log levels, such as "debug" or "error". As +this method is defined also in other logging roles/systems like +MooseX::Log::LogDispatch this can be thought of as a common logging +interface. + + package MyApp::View::JSON; + + extends 'MyApp::View'; + with 'MooseX:Log::Log4perl'; + + sub bar { + $self->logger->info("Everything fine so far"); # logs a info message + $self->logger->debug("Something is fishy here"); # logs a debug message + } + +### log([$category]) + +Basically the same as logger, but also allowing to change the log category +for this log message. If the category starts with a "+", we pre-pend the +current class (what would have been the category if you didn't specify +one). + + if ($myapp->log->is_debug()) { + $myapp->log->debug("Woot"); # category is class myapp + } + $myapp->log("TempCat")->info("Foobar"); # category TempCat + $myapp->log->info("Grumble"); # category class again myapp + $myapp->log(".TempCat")->info("Foobar"); # category myapp.TempCat + $myapp->log("::TempCat")->info("Foobar"); # category myapp.TempCat + +SEE ALSO +-------- + +Log::Log4perl, Moose, Moo, MooX::Log::Any, MooX::Role::Logger + +BUGS AND LIMITATIONS +-------------------- + +Please report any issues at + +Or come bother us in "#moose" on "irc.perl.org". + +AUTHOR +------- + +Roland Lammel + +Inspired by the work by Chris Prather and Ash Berlin + on MooseX::LogDispatch + +CONTRIBUTORS +------------ + +In alphabetical order: + +* abraxxa for Any::Moose deprectation +* Michael Schilli for Log::Log4perl and interface suggestions +* omega for catgory prefix support +* Tim Bunce for corrections in the MooseX::Log::Log4perl::Easy module. + +LICENSE AND COPYRIGHT +--------------------- + +Copyright (c) 2008-2016, Roland Lammel , http://www.quikit.at + +This module is free software; you can redistribute it and/or modify it +under the same terms as Perl itself. See perlartistic. diff -Nru libmoosex-log-log4perl-perl-0.46/t/01basic.t libmoosex-log-log4perl-perl-0.47/t/01basic.t --- libmoosex-log-log4perl-perl-0.46/t/01basic.t 2012-06-27 18:05:33.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/t/01basic.t 2015-12-08 18:07:16.000000000 +0000 @@ -23,7 +23,7 @@ { package BasicLogTest; - use Moose; + use Moo; with 'MooseX::Log::Log4perl'; sub test_log { @@ -42,10 +42,10 @@ { package BasicLogTest; - use Moose; + use Moo; with 'MooseX::Log::Log4perl'; - has 'foo' => ( is => 'rw', isa => 'Str' ); + has 'foo' => ( is => 'rw' ); } { diff -Nru libmoosex-log-log4perl-perl-0.46/t/02easy.t libmoosex-log-log4perl-perl-0.47/t/02easy.t --- libmoosex-log-log4perl-perl-0.46/t/02easy.t 2012-06-27 18:05:33.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/t/02easy.t 2015-12-08 18:07:16.000000000 +0000 @@ -23,7 +23,7 @@ { package EasyLogTest; - use Moose; + use Moo; with 'MooseX::Log::Log4perl::Easy'; sub test_easy { @@ -35,13 +35,13 @@ $self->log_error('big'); $self->log_fatal('brains'); } - + sub test_log { my ($self) = @_; $self->log("SPECIAL")->info('BAZ'); $self->log->debug('foo'); $self->log->error('bar'); - + } } @@ -92,4 +92,4 @@ $err = ''; untie *STDERR; -} \ No newline at end of file +} diff -Nru libmoosex-log-log4perl-perl-0.46/t/03inheritance.t libmoosex-log-log4perl-perl-0.47/t/03inheritance.t --- libmoosex-log-log4perl-perl-0.46/t/03inheritance.t 2012-06-27 18:45:15.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/t/03inheritance.t 2015-12-08 18:07:16.000000000 +0000 @@ -21,7 +21,7 @@ { package Parent; - use Moose; + use Moo; with 'MooseX::Log::Log4perl'; sub overridden { shift->log->warn('Parent overridden'); } @@ -31,7 +31,7 @@ { package Child; - use Moose; + use Moo; extends 'Parent'; with 'MooseX::Log::Log4perl'; diff -Nru libmoosex-log-log4perl-perl-0.46/t/99bench.t libmoosex-log-log4perl-perl-0.47/t/99bench.t --- libmoosex-log-log4perl-perl-0.46/t/99bench.t 2012-06-27 18:05:33.000000000 +0000 +++ libmoosex-log-log4perl-perl-0.47/t/99bench.t 2015-12-08 20:27:57.000000000 +0000 @@ -11,6 +11,8 @@ plan skip_all => 'Author test. Set $ENV{TEST_AUTHOR} to run benchmark tests' unless $ENV{TEST_AUTHOR}; plan tests => 6; +my $benchlimit = 85; # accept 85% performance hit due to method call overhead + BEGIN { $tmplogfile = 'mxll4p_benchtest.log'; } END { ### Remove tmpfile if exists @@ -29,7 +31,7 @@ { package BenchMooseXLogLog4perl; - use Moose; + use Moo; with 'MooseX::Log::Log4perl'; sub testlog { shift->log->info("Just a test for logging"); } @@ -88,17 +90,17 @@ } my ($rate_logger, $rate_log); $rate_logger = 100 * $bench{'MooseX-L4p logger'} / $bench{'Log4perl direct'}; - ok($rate_logger > 95, sprintf("Call rate of ->logger must be above 95%% " . + ok($rate_logger >= $benchlimit, sprintf("Call rate of ->logger must be above $benchlimit%% " . "(%i / %i = %.2f %%) to Log4perl direct", $bench{'MooseX-L4p logger'}, $bench{'Log4perl direct'}, $rate_logger)); $rate_log = 100 * $bench{'MooseX-L4p log'} / $bench{'Log4perl direct'}; - ok($rate_log > 94, sprintf("Call rate of ->log must be above 94%% " . + ok($rate_log >= $benchlimit, sprintf("Call rate of ->log must be above $benchlimit%% " . "(%i / %i = %.2f %%) to Log4perl direct", $bench{'MooseX-L4p logger'}, $bench{'Log4perl direct'}, $rate_log)); $rate_logger = 100 * $bench{'MooseX-L4p logger'} / $bench{'Log4perl method'}; - ok($rate_logger > 95, sprintf("Call rate of ->logger must be above 95%% " . + ok($rate_logger >= $benchlimit, sprintf("Call rate of ->logger must be above $benchlimit%% " . "(%i / %i = %.2f %%) to Log4perl via method", $bench{'MooseX-L4p logger'}, $bench{'Log4perl method'}, $rate_logger)); $rate_log = 100 * $bench{'MooseX-L4p log'} / $bench{'Log4perl method'}; - ok($rate_log > 95, sprintf("Call rate of ->log must be above 95%% " . + ok($rate_log >= $benchlimit, sprintf("Call rate of ->log must be above $benchlimit%% " . "(%i / %i = %.2f %%) to Log4perl via method", $bench{'MooseX-L4p logger'}, $bench{'Log4perl method'}, $rate_log)); }