cazador481 / moox-log-any Goto Github PK
View Code? Open in Web Editor NEWMooX::Log::Any
License: Other
MooX::Log::Any
License: Other
Since initialization is always a question, maybe following code snippet could help...
package MyApp::Role::Logging;
use Class::Load qw(load_class);
use Moo::Role;
with "MooX::Log::Any";
has log_adapter => (
is => "ro",
required => 1,
trigger => 1,
);
has log_adapter_guard => (
is => "rw",
init_arg => undef,
);
sub _trigger_log_adapter
{
my ($self, $opts) = @_;
my $entry = load_class("Log::Any::Adapter")->set(@{$opts});
$self->log_adapter_guard(Log::Any::Manager::_Guard->new(sub { Log::Any::Adapter->remove($entry) }));
}
1;
For packages with dual-life (CLI, Plack-Handler), this avoids hundred new entries on Log::Any::Managers stack of log-adapters.
Maybe there is a more elegant solution for it, but it works.
This distribution does not declare the minimum perl version in META.yml.
If you are using Build.PL define the {requires}{perl} = VERSION field. If you are using MakeMaker (Makefile.PL) you should upgrade ExtUtils::MakeMaker to 6.48 and use MIN_PERL_VERSION parameter. Perl::MinimumVersion can help you determine which version of Perl your module needs.
The dependency on Log::Any::Adapter seems to come from the commented isa => Log::Any::Adapter
and should be removed.
In the readme.md add which branches are for development, and which branches are for release.
They are being set to MooX::log::Any
To fix init with Log::Any->get_logger(category=>ref shift);
Another directly competing CPAN module - MooX::Role::Logger - would arguably be the most relevant to mention in SEE ALSO but is unfortunately missing.
Please consider at least mentioning it, and ideally elaborating a bit on how they compare.
Maybe you shouldn't upload that fast but ask for review/testing before. See https://rt.cpan.org/Ticket/Display.html?id=99111 for further details.
From cpants:
This distribution does not have a list of provided modules defined in META.yml.
Add all modules contained in this distribution to the META.yml field 'provides'. Module::Build or Dist::Zilla::Plugin::MetaProvides do this automatically for you.
According to Version numbers should be boring you should seriously use a unique and incremental versioning style.
0.0.2 is the same as 0.000002 which is lower than 0.001
There is no "PERL" - it's "perl" ;)
Running install for module 'MooX::Log::Any'
Checksum for /home/jrehsack/.cpan/sources/authors/id/C/CA/CAZADOR/MooX-Log-Any-0.003001.tar.gz ok
Configuring C/CA/CAZADOR/MooX-Log-Any-0.003001.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite PERL 5.006 not found.
Generating a Unix-style Makefile
Writing Makefile for MooX::Log::Any
Writing MYMETA.yml and MYMETA.json
CAZADOR/MooX-Log-Any-0.003001.tar.gz
~/perl5/perlbrew/perls/perl-5.20.1/bin/perl Makefile.PL -- OK
Running make for C/CA/CAZADOR/MooX-Log-Any-0.003001.tar.gz
---- Unsatisfied dependencies detected during ----
---- CAZADOR/MooX-Log-Any-0.003001.tar.gz ----
PERL [requires]
Running install for module 'PERL'
The module PERL isn't available on CPAN.
Either the module has not yet been uploaded to CPAN, or it is
temporary unavailable. Please contact the author to find out
more about the status. Try 'i PERL'.
CAZADOR/MooX-Log-Any-0.003001.tar.gz
Has already been unwrapped into directory ~/.cpan/build/MooX-Log-Any-0.003001-Kn6cpy
CAZADOR/MooX-Log-Any-0.003001.tar.gz
Has already been prepared
Running make for C/CA/CAZADOR/MooX-Log-Any-0.003001.tar.gz
cp lib/MooX/Log/Any.pm blib/lib/MooX/Log/Any.pm
Manifying 1 pod document
CAZADOR/MooX-Log-Any-0.003001.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 "~/perl5/perlbrew/perls/perl-5.20.1/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/.t
t/l0.t .................... ok
t/release-test-version.t .. skipped: these tests are for release candidate testing
All tests successful.
Files=2, Tests=2, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.09 cusr 0.00 csys = 0.11 CPU)
Result: PASS
CAZADOR/MooX-Log-Any-0.003001.tar.gz
Tests succeeded but one dependency not OK (PERL)
CAZADOR/MooX-Log-Any-0.003001.tar.gz
[dependencies] -- NA
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.