diff -Nru liblog-any-adapter-log4perl-perl-0.08/Changes liblog-any-adapter-log4perl-perl-0.09/Changes --- liblog-any-adapter-log4perl-perl-0.08/Changes 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/Changes 2018-04-22 11:41:23.000000000 +0000 @@ -1,5 +1,13 @@ Revision history for Log-Any-Adapter-Log4perl +0.09 2018-04-22 13:41:19+02:00 Europe/Oslo + + [Added] + + - Added support for mapping Log::Any structured logging (added in + Log-Any 1.700) to the Mapped Diagnostic Context. Thanks @dakkar! + [Github #5] + 0.08 2015-04-04 14:06:26-04:00 America/New_York [Changed] diff -Nru liblog-any-adapter-log4perl-perl-0.08/cpanfile liblog-any-adapter-log4perl-perl-0.09/cpanfile --- liblog-any-adapter-log4perl-perl-0.08/cpanfile 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/cpanfile 2018-04-22 11:41:23.000000000 +0000 @@ -32,10 +32,16 @@ requires "IO::Handle" => "0"; requires "IPC::Open3" => "0"; requires "Pod::Coverage::TrustPod" => "0"; + requires "Pod::Wordlist" => "0"; + requires "Software::License::Perl_5" => "0"; requires "Test::CPAN::Meta" => "0"; + requires "Test::MinimumVersion" => "0"; requires "Test::More" => "0"; + requires "Test::Perl::Critic" => "0"; requires "Test::Pod" => "1.41"; requires "Test::Pod::Coverage" => "1.08"; + requires "Test::Portability::Files" => "0"; requires "Test::Spelling" => "0.12"; requires "Test::Version" => "1"; + requires "perl" => "5.006"; }; diff -Nru liblog-any-adapter-log4perl-perl-0.08/debian/changelog liblog-any-adapter-log4perl-perl-0.09/debian/changelog --- liblog-any-adapter-log4perl-perl-0.08/debian/changelog 2015-05-01 20:12:58.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/debian/changelog 2018-08-01 13:32:22.000000000 +0000 @@ -1,3 +1,25 @@ +liblog-any-adapter-log4perl-perl (0.09-1) unstable; urgency=medium + + * Team upload. + + [ Salvatore Bonaccorso ] + * debian/control: Use HTTPS transport protocol for Vcs-Git URI + + [ gregor herrmann ] + * debian/copyright: change Copyright-Format 1.0 URL to HTTPS. + + [ Salvatore Bonaccorso ] + * Update Vcs-* headers for switch to salsa.debian.org + + [ gregor herrmann ] + * Import upstream version 0.09. + * Update debian/upstream/metadata. + * Update years of upstream copyright and upstream contact. + * Declare compliance with Debian Policy 4.1.5. + * Bump debhelper compatibility level to 10. + + -- gregor herrmann Wed, 01 Aug 2018 15:32:22 +0200 + liblog-any-adapter-log4perl-perl (0.08-1) unstable; urgency=medium * Team upload. diff -Nru liblog-any-adapter-log4perl-perl-0.08/debian/compat liblog-any-adapter-log4perl-perl-0.09/debian/compat --- liblog-any-adapter-log4perl-perl-0.08/debian/compat 2015-05-01 20:12:58.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/debian/compat 2018-08-01 13:32:22.000000000 +0000 @@ -1 +1 @@ -8 +10 diff -Nru liblog-any-adapter-log4perl-perl-0.08/debian/control liblog-any-adapter-log4perl-perl-0.09/debian/control --- liblog-any-adapter-log4perl-perl-0.08/debian/control 2015-05-01 20:12:58.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/debian/control 2018-08-01 13:32:22.000000000 +0000 @@ -4,13 +4,13 @@ Section: perl Testsuite: autopkgtest-pkg-perl Priority: optional -Build-Depends: debhelper (>= 8) +Build-Depends: debhelper (>= 10) Build-Depends-Indep: liblog-any-perl (>= 1.03), liblog-log4perl-perl (>= 1.32), perl -Standards-Version: 3.9.6 -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/liblog-any-adapter-log4perl-perl.git -Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/liblog-any-adapter-log4perl-perl.git +Standards-Version: 4.1.5 +Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/liblog-any-adapter-log4perl-perl +Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/liblog-any-adapter-log4perl-perl.git Homepage: https://metacpan.org/release/Log-Any-Adapter-Log4perl Package: liblog-any-adapter-log4perl-perl diff -Nru liblog-any-adapter-log4perl-perl-0.08/debian/copyright liblog-any-adapter-log4perl-perl-0.09/debian/copyright --- liblog-any-adapter-log4perl-perl-0.08/debian/copyright 2015-05-01 20:12:58.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/debian/copyright 2018-08-01 13:32:22.000000000 +0000 @@ -1,10 +1,10 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Source: https://metacpan.org/release/Log-Any-Adapter-Log4perl -Upstream-Contact: Jonathan Swartz +Upstream-Contact: Doug Bell Upstream-Name: Log-Any-Adapter-Log4perl Files: * -Copyright: 2007-2015, Jonathan Swartz +Copyright: 2007-2018, Jonathan Swartz License: Artistic or GPL-1+ Files: debian/* diff -Nru liblog-any-adapter-log4perl-perl-0.08/debian/upstream/metadata liblog-any-adapter-log4perl-perl-0.09/debian/upstream/metadata --- liblog-any-adapter-log4perl-perl-0.08/debian/upstream/metadata 2015-05-01 20:12:58.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/debian/upstream/metadata 2018-08-01 13:32:22.000000000 +0000 @@ -1,7 +1,7 @@ --- Archive: CPAN -Bug-Database: https://github.com/dagolden/Log-Any-Adapter-Log4perl/issues -Contact: Jonathan Swartz , David Golden +Bug-Database: https://github.com/preaction/Log-Any-Adapter-Log4perl/issues +Contact: Doug Bell Name: Log-Any-Adapter-Log4perl -Repository: https://github.com/dagolden/Log-Any-Adapter-Log4perl.git -Repository-Browse: https://github.com/dagolden/Log-Any-Adapter-Log4perl +Repository: https://github.com/preaction/Log-Any-Adapter-Log4perl.git +Repository-Browse: https://github.com/preaction/Log-Any-Adapter-Log4perl diff -Nru liblog-any-adapter-log4perl-perl-0.08/dist.ini liblog-any-adapter-log4perl-perl-0.09/dist.ini --- liblog-any-adapter-log4perl-perl-0.08/dist.ini 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/dist.ini 2018-04-22 11:41:23.000000000 +0000 @@ -1,6 +1,7 @@ name = Log-Any-Adapter-Log4perl author = Jonathan Swartz author = David Golden +author = Doug Bell license = Perl_5 copyright_holder = Jonathan Swartz diff -Nru liblog-any-adapter-log4perl-perl-0.08/lib/Log/Any/Adapter/Log4perl.pm liblog-any-adapter-log4perl-perl-0.09/lib/Log/Any/Adapter/Log4perl.pm --- liblog-any-adapter-log4perl-perl-0.08/lib/Log/Any/Adapter/Log4perl.pm 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/lib/Log/Any/Adapter/Log4perl.pm 2018-04-22 11:41:23.000000000 +0000 @@ -8,7 +8,7 @@ use Log::Any::Adapter::Util 1.03 qw(make_method); use base qw(Log::Any::Adapter::Base); -our $VERSION = '0.08'; +our $VERSION = '0.09'; # Ensure %F, %C, etc. skip Log::Any related packages Log::Log4perl->wrapper_register(__PACKAGE__); @@ -40,6 +40,16 @@ ); } +sub structured { + my ($adapter, $level, $category, @parts) = @_; + my $context = ref($parts[-1]) eq 'HASH' + ? pop @parts + : {}; + my $mdc = Log::Log4perl::MDC->get_context; + local @{$mdc}{keys %{$context}} = values %{$context}; + $adapter->$level(@parts); +} + 1; __END__ @@ -54,7 +64,7 @@ =head1 VERSION -version 0.08 +version 0.09 =head1 SYNOPSIS @@ -80,6 +90,12 @@ alert -> fatal emergency -> fatal +=head1 METHODS + +=head2 structured + +This adapter supports structured logging, introduced in Log-Any v1.700. + =head1 SEE ALSO =over 4 @@ -105,7 +121,7 @@ =head2 Bugs / Feature Requests Please report any bugs or feature requests through the issue tracker -at L. +at L. You will be notified automatically of any progress on your issue. =head2 Source Code @@ -113,9 +129,9 @@ This is open source software. The code repository is available for public review and contribution under the terms of the license. -L +L - git clone https://github.com/dagolden/Log-Any-Adapter-Log4perl.git + git clone https://github.com/preaction/Log-Any-Adapter-Log4perl.git =head1 AUTHORS @@ -129,11 +145,31 @@ David Golden +=item * + +Doug Bell + +=back + +=head1 CONTRIBUTORS + +=for stopwords Doug Bell Gianni Ceccarelli + +=over 4 + +=item * + +Doug Bell + +=item * + +Gianni Ceccarelli + =back =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2015 by Jonathan Swartz. +This software is copyright (c) 2018 by Jonathan Swartz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. diff -Nru liblog-any-adapter-log4perl-perl-0.08/LICENSE liblog-any-adapter-log4perl-perl-0.09/LICENSE --- liblog-any-adapter-log4perl-perl-0.08/LICENSE 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/LICENSE 2018-04-22 11:41:23.000000000 +0000 @@ -1,4 +1,4 @@ -This software is copyright (c) 2015 by Jonathan Swartz. +This software is copyright (c) 2018 by Jonathan Swartz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. @@ -12,7 +12,7 @@ --- The GNU General Public License, Version 1, February 1989 --- -This software is Copyright (c) 2015 by Jonathan Swartz. +This software is Copyright (c) 2018 by Jonathan Swartz. This is free software, licensed under: @@ -272,7 +272,7 @@ --- The Artistic License 1.0 --- -This software is Copyright (c) 2015 by Jonathan Swartz. +This software is Copyright (c) 2018 by Jonathan Swartz. This is free software, licensed under: diff -Nru liblog-any-adapter-log4perl-perl-0.08/Makefile.PL liblog-any-adapter-log4perl-perl-0.09/Makefile.PL --- liblog-any-adapter-log4perl-perl-0.08/Makefile.PL 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/Makefile.PL 2018-04-22 11:41:23.000000000 +0000 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.034. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012. use strict; use warnings; @@ -8,12 +8,11 @@ my %WriteMakefileArgs = ( "ABSTRACT" => "Log::Any adapter for Log::Log4perl", - "AUTHOR" => "Jonathan Swartz , David Golden ", + "AUTHOR" => "Jonathan Swartz , David Golden , Doug Bell ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.17" }, "DISTNAME" => "Log-Any-Adapter-Log4perl", - "EXE_FILES" => [], "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.006", "NAME" => "Log::Any::Adapter::Log4perl", @@ -32,7 +31,7 @@ "Log::Any::Adapter" => "1.03", "Test::More" => 0 }, - "VERSION" => "0.08", + "VERSION" => "0.09", "test" => { "TESTS" => "t/*.t" } @@ -40,7 +39,7 @@ my %FallbackPrereqs = ( - "ExtUtils::MakeMaker" => "6.17", + "ExtUtils::MakeMaker" => 0, "File::Spec" => 0, "File::Temp" => "0.20", "Log::Any::Adapter" => "1.03", diff -Nru liblog-any-adapter-log4perl-perl-0.08/MANIFEST liblog-any-adapter-log4perl-perl-0.09/MANIFEST --- liblog-any-adapter-log4perl-perl-0.08/MANIFEST 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/MANIFEST 2018-04-22 11:41:23.000000000 +0000 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.034. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012. CONTRIBUTING.mkdn Changes LICENSE @@ -16,10 +16,10 @@ t/log4perl.t xt/author/00-compile.t xt/author/critic.t +xt/author/minimum-version.t +xt/author/pod-coverage.t xt/author/pod-spell.t +xt/author/pod-syntax.t +xt/author/portability.t +xt/author/test-version.t xt/release/distmeta.t -xt/release/minimum-version.t -xt/release/pod-coverage.t -xt/release/pod-syntax.t -xt/release/portability.t -xt/release/test-version.t diff -Nru liblog-any-adapter-log4perl-perl-0.08/META.json liblog-any-adapter-log4perl-perl-0.09/META.json --- liblog-any-adapter-log4perl-perl-0.08/META.json 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/META.json 2018-04-22 11:41:23.000000000 +0000 @@ -2,10 +2,11 @@ "abstract" : "Log::Any adapter for Log::Log4perl", "author" : [ "Jonathan Swartz ", - "David Golden " + "David Golden ", + "Doug Bell " ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 5.034, CPAN::Meta::Converter version 2.150001", + "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -16,10 +17,10 @@ "name" : "Log-Any-Adapter-Log4perl", "no_index" : { "directory" : [ - "t", - "xt", + "corpus", "examples", - "corpus" + "t", + "xt" ], "package" : [ "DB" @@ -41,12 +42,18 @@ "IO::Handle" : "0", "IPC::Open3" : "0", "Pod::Coverage::TrustPod" : "0", + "Pod::Wordlist" : "0", + "Software::License::Perl_5" : "0", "Test::CPAN::Meta" : "0", + "Test::MinimumVersion" : "0", "Test::More" : "0", + "Test::Perl::Critic" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", + "Test::Portability::Files" : "0", "Test::Spelling" : "0.12", - "Test::Version" : "1" + "Test::Version" : "1", + "perl" : "5.006" } }, "runtime" : { @@ -77,22 +84,28 @@ "provides" : { "Log::Any::Adapter::Log4perl" : { "file" : "lib/Log/Any/Adapter/Log4perl.pm", - "version" : "0.08" + "version" : "0.09" } }, "release_status" : "stable", "resources" : { "bugtracker" : { - "web" : "https://github.com/dagolden/Log-Any-Adapter-Log4perl/issues" + "web" : "https://github.com/preaction/Log-Any-Adapter-Log4perl/issues" }, - "homepage" : "https://github.com/dagolden/Log-Any-Adapter-Log4perl", + "homepage" : "https://github.com/preaction/Log-Any-Adapter-Log4perl", "repository" : { "type" : "git", - "url" : "https://github.com/dagolden/Log-Any-Adapter-Log4perl.git", - "web" : "https://github.com/dagolden/Log-Any-Adapter-Log4perl" + "url" : "https://github.com/preaction/Log-Any-Adapter-Log4perl.git", + "web" : "https://github.com/preaction/Log-Any-Adapter-Log4perl" } }, - "version" : "0.08", - "x_authority" : "cpan:DAGOLDEN" + "version" : "0.09", + "x_authority" : "cpan:DAGOLDEN", + "x_contributors" : [ + "Doug Bell ", + "Gianni Ceccarelli " + ], + "x_generated_by_perl" : "v5.26.1", + "x_serialization_backend" : "Cpanel::JSON::XS version 4.02" } diff -Nru liblog-any-adapter-log4perl-perl-0.08/META.yml liblog-any-adapter-log4perl-perl-0.09/META.yml --- liblog-any-adapter-log4perl-perl-0.08/META.yml 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/META.yml 2018-04-22 11:41:23.000000000 +0000 @@ -3,6 +3,7 @@ author: - 'Jonathan Swartz ' - 'David Golden ' + - 'Doug Bell ' build_requires: ExtUtils::MakeMaker: '0' File::Spec: '0' @@ -14,7 +15,7 @@ ExtUtils::MakeMaker: '6.17' perl: '5.006' dynamic_config: 0 -generated_by: 'Dist::Zilla version 5.034, CPAN::Meta::Converter version 2.150001' +generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -22,16 +23,16 @@ name: Log-Any-Adapter-Log4perl no_index: directory: + - corpus + - examples - t - xt - - examples - - corpus package: - DB provides: Log::Any::Adapter::Log4perl: file: lib/Log/Any/Adapter/Log4perl.pm - version: '0.08' + version: '0.09' requires: Log::Any::Adapter::Base: '0' Log::Any::Adapter::Util: '1.03' @@ -41,8 +42,13 @@ strict: '0' warnings: '0' resources: - bugtracker: https://github.com/dagolden/Log-Any-Adapter-Log4perl/issues - homepage: https://github.com/dagolden/Log-Any-Adapter-Log4perl - repository: https://github.com/dagolden/Log-Any-Adapter-Log4perl.git -version: '0.08' + bugtracker: https://github.com/preaction/Log-Any-Adapter-Log4perl/issues + homepage: https://github.com/preaction/Log-Any-Adapter-Log4perl + repository: https://github.com/preaction/Log-Any-Adapter-Log4perl.git +version: '0.09' x_authority: cpan:DAGOLDEN +x_contributors: + - 'Doug Bell ' + - 'Gianni Ceccarelli ' +x_generated_by_perl: v5.26.1 +x_serialization_backend: 'YAML::Tiny version 1.73' diff -Nru liblog-any-adapter-log4perl-perl-0.08/README liblog-any-adapter-log4perl-perl-0.09/README --- liblog-any-adapter-log4perl-perl-0.08/README 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/README 2018-04-22 11:41:23.000000000 +0000 @@ -2,7 +2,7 @@ Log::Any::Adapter::Log4perl - Log::Any adapter for Log::Log4perl VERSION - version 0.08 + version 0.09 SYNOPSIS use Log::Log4perl; @@ -23,6 +23,10 @@ alert -> fatal emergency -> fatal +METHODS + structured + This adapter supports structured logging, introduced in Log-Any v1.700. + SEE ALSO * Log::Any @@ -33,24 +37,31 @@ SUPPORT Bugs / Feature Requests Please report any bugs or feature requests through the issue tracker at - . You will + . You will be notified automatically of any progress on your issue. Source Code This is open source software. The code repository is available for public review and contribution under the terms of the license. - + - git clone https://github.com/dagolden/Log-Any-Adapter-Log4perl.git + git clone https://github.com/preaction/Log-Any-Adapter-Log4perl.git AUTHORS * Jonathan Swartz * David Golden + * Doug Bell + +CONTRIBUTORS + * Doug Bell + + * Gianni Ceccarelli + COPYRIGHT AND LICENSE - This software is copyright (c) 2015 by Jonathan Swartz. + This software is copyright (c) 2018 by Jonathan Swartz. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. diff -Nru liblog-any-adapter-log4perl-perl-0.08/t/00-report-prereqs.dd liblog-any-adapter-log4perl-perl-0.09/t/00-report-prereqs.dd --- liblog-any-adapter-log4perl-perl-0.08/t/00-report-prereqs.dd 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/t/00-report-prereqs.dd 2018-04-22 11:41:23.000000000 +0000 @@ -14,12 +14,18 @@ 'IO::Handle' => '0', 'IPC::Open3' => '0', 'Pod::Coverage::TrustPod' => '0', + 'Pod::Wordlist' => '0', + 'Software::License::Perl_5' => '0', 'Test::CPAN::Meta' => '0', + 'Test::MinimumVersion' => '0', 'Test::More' => '0', + 'Test::Perl::Critic' => '0', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.08', + 'Test::Portability::Files' => '0', 'Test::Spelling' => '0.12', - 'Test::Version' => '1' + 'Test::Version' => '1', + 'perl' => '5.006' } }, 'runtime' => { diff -Nru liblog-any-adapter-log4perl-perl-0.08/t/00-report-prereqs.t liblog-any-adapter-log4perl-perl-0.09/t/00-report-prereqs.t --- liblog-any-adapter-log4perl-perl-0.08/t/00-report-prereqs.t 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/t/00-report-prereqs.t 2018-04-22 11:41:23.000000000 +0000 @@ -3,7 +3,7 @@ use strict; use warnings; -# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.021 +# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027 use Test::More tests => 1; @@ -68,7 +68,7 @@ ); # Add static prereqs to the included modules list -my $static_prereqs = do 't/00-report-prereqs.dd'; +my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( @@ -78,12 +78,14 @@ # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; -if ( $source && $HAS_CPAN_META ) { - if ( my $meta = eval { CPAN::Meta->load_file($source) } ) { - $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); - } +my $cpan_meta_error; +if ( $source && $HAS_CPAN_META + && (my $meta = eval { CPAN::Meta->load_file($source) } ) +) { + $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { + $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } @@ -169,10 +171,18 @@ diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } +if ( $cpan_meta_error || @dep_errors ) { + diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; +} + +if ( $cpan_meta_error ) { + my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; + diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; +} + if ( @dep_errors ) { diag join("\n", - "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n", - "The following REQUIRED prerequisites were not satisfied:\n", + "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); diff -Nru liblog-any-adapter-log4perl-perl-0.08/t/log4perl.t liblog-any-adapter-log4perl-perl-0.09/t/log4perl.t --- liblog-any-adapter-log4perl-perl-0.08/t/log4perl.t 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/t/log4perl.t 2018-04-22 11:41:23.000000000 +0000 @@ -7,13 +7,15 @@ use strict; use warnings; +my $has_structured_logging = Log::Any::Adapter->VERSION ge '1.5'; + my $dir = tempdir( 'log-any-log4perl-XXXX', TMPDIR => 1, CLEANUP => 1 ); my $conf = " log4perl.rootLogger = WARN, Logfile log4perl.appender.Logfile = Log::Log4perl::Appender::File log4perl.appender.Logfile.filename = $dir/test.log log4perl.appender.Logfile.layout = Log::Log4perl::Layout::PatternLayout -log4perl.appender.Logfile.layout.ConversionPattern = %C:%F:%L; %c; %p; %m%n +log4perl.appender.Logfile.layout.ConversionPattern = %C:%F:%L; %c; %p; %m %X{mdc_key}%n "; Log::Log4perl::init( \$conf ); Log::Any::Adapter->set('Log::Log4perl'); @@ -23,6 +25,7 @@ my $test_count = scalar(@methods) + + ($has_structured_logging ? scalar(@methods) : 0) + scalar( Log::Any->detection_methods ) + scalar( Log::Any->detection_aliases ); plan tests => $test_count; @@ -31,9 +34,12 @@ foreach my $method (@methods) { my $log = Log::Any->get_logger( category => "category_$method" ); $log->$method("logging with $method"); + $log->$method("structured with $method",{mdc_key=>"mdc $method"}) + if $has_structured_logging; $next_line = __LINE__; } -my $log_line = $next_line - 1; +my $log_line = $next_line - 3; +my $structured_log_line = $next_line - 2; my $contents = read_file("$dir/test.log"); foreach my $method (@methods) { ( my $level = $method ) =~ s/f$//; @@ -47,12 +53,31 @@ $level = uc($level); like( $contents, - qr/main:.*log4perl.t:$log_line; category_$method; $level; logging with $method\n/, + qr/main:.*log4perl.t:$log_line; category_$method; $level; logging with $method \[undef\]\n/, "found $method" ); + + if ($has_structured_logging) { + if ($method =~ /f$/) { + like( + $contents, + qr/main:.*log4perl.t:$structured_log_line; category_$method; $level; structured with $method \[undef\]\n/, + "found $method structured" + ); + } + else { + like( + $contents, + qr/main:.*log4perl.t:$structured_log_line; category_$method; $level; structured with $method mdc $method\n/, + "found $method structured" + ); + } + } } else { unlike( $contents, qr/logging with $method/, "did not find $method" ); + unlike( $contents, qr/structured with $method/, "did not find $method structured" ) + if $has_structured_logging; } } my $log = Log::Any->get_logger(); diff -Nru liblog-any-adapter-log4perl-perl-0.08/xt/author/00-compile.t liblog-any-adapter-log4perl-perl-0.09/xt/author/00-compile.t --- liblog-any-adapter-log4perl-perl-0.08/xt/author/00-compile.t 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/xt/author/00-compile.t 2018-04-22 11:41:23.000000000 +0000 @@ -2,7 +2,7 @@ use strict; use warnings; -# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.052 +# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058 use Test::More; @@ -19,7 +19,9 @@ local $ENV{HOME} = File::Temp::tempdir( CLEANUP => 1 ); -my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; +my @switches = ( + -d 'blib' ? '-Mblib' : '-Ilib', +); use File::Spec; use IPC::Open3; @@ -33,12 +35,19 @@ # see L my $stderr = IO::Handle->new; - my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); + diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } + $^X, @switches, '-e', "require q[$lib]")) + if $ENV{PERL_COMPILE_TEST_DEBUG}; + + my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); + shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ + and not eval { +require blib; blib->VERSION('1.01') }; + if (@_warnings) { warn @_warnings; diff -Nru liblog-any-adapter-log4perl-perl-0.08/xt/author/critic.t liblog-any-adapter-log4perl-perl-0.09/xt/author/critic.t --- liblog-any-adapter-log4perl-perl-0.08/xt/author/critic.t 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/xt/author/critic.t 2018-04-22 11:41:23.000000000 +0000 @@ -3,10 +3,5 @@ use strict; use warnings; -use Test::More; -use English qw(-no_match_vars); - -eval "use Test::Perl::Critic"; -plan skip_all => 'Test::Perl::Critic required to criticise code' if $@; -Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc"; +use Test::Perl::Critic (-profile => "perlcritic.rc") x!! -e "perlcritic.rc"; all_critic_ok(); diff -Nru liblog-any-adapter-log4perl-perl-0.08/xt/author/minimum-version.t liblog-any-adapter-log4perl-perl-0.09/xt/author/minimum-version.t --- liblog-any-adapter-log4perl-perl-0.08/xt/author/minimum-version.t 1970-01-01 00:00:00.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/xt/author/minimum-version.t 2018-04-22 11:41:23.000000000 +0000 @@ -0,0 +1,6 @@ +#!perl + +use Test::More; + +use Test::MinimumVersion; +all_minimum_version_ok( qq{5.010} ); diff -Nru liblog-any-adapter-log4perl-perl-0.08/xt/author/pod-coverage.t liblog-any-adapter-log4perl-perl-0.09/xt/author/pod-coverage.t --- liblog-any-adapter-log4perl-perl-0.08/xt/author/pod-coverage.t 1970-01-01 00:00:00.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/xt/author/pod-coverage.t 2018-04-22 11:41:23.000000000 +0000 @@ -0,0 +1,7 @@ +#!perl +# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. + +use Test::Pod::Coverage 1.08; +use Pod::Coverage::TrustPod; + +all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); diff -Nru liblog-any-adapter-log4perl-perl-0.08/xt/author/pod-spell.t liblog-any-adapter-log4perl-perl-0.09/xt/author/pod-spell.t --- liblog-any-adapter-log4perl-perl-0.08/xt/author/pod-spell.t 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/xt/author/pod-spell.t 2018-04-22 11:41:23.000000000 +0000 @@ -2,22 +2,29 @@ use warnings; use Test::More; -# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006008 +# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007005 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); -all_pod_files_spelling_ok( qw( bin lib ) ); +all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ -Jonathan -Swartz -swartz +Adapter +Any +Bell +Ceccarelli David +Doug +Gianni Golden -dagolden -lib +Jonathan Log -Any -Adapter Log4perl +Swartz +dagolden +doug +gianni +lib +preaction +swartz diff -Nru liblog-any-adapter-log4perl-perl-0.08/xt/author/pod-syntax.t liblog-any-adapter-log4perl-perl-0.09/xt/author/pod-syntax.t --- liblog-any-adapter-log4perl-perl-0.08/xt/author/pod-syntax.t 1970-01-01 00:00:00.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/xt/author/pod-syntax.t 2018-04-22 11:41:23.000000000 +0000 @@ -0,0 +1,7 @@ +#!perl +# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. +use strict; use warnings; +use Test::More; +use Test::Pod 1.41; + +all_pod_files_ok(); diff -Nru liblog-any-adapter-log4perl-perl-0.08/xt/author/portability.t liblog-any-adapter-log4perl-perl-0.09/xt/author/portability.t --- liblog-any-adapter-log4perl-perl-0.08/xt/author/portability.t 1970-01-01 00:00:00.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/xt/author/portability.t 2018-04-22 11:41:23.000000000 +0000 @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +eval 'use Test::Portability::Files'; +plan skip_all => 'Test::Portability::Files required for testing portability' + if $@; +options(test_one_dot => 0); +run_tests(); diff -Nru liblog-any-adapter-log4perl-perl-0.08/xt/author/test-version.t liblog-any-adapter-log4perl-perl-0.09/xt/author/test-version.t --- liblog-any-adapter-log4perl-perl-0.08/xt/author/test-version.t 1970-01-01 00:00:00.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/xt/author/test-version.t 2018-04-22 11:41:23.000000000 +0000 @@ -0,0 +1,23 @@ +use strict; +use warnings; +use Test::More; + +# generated by Dist::Zilla::Plugin::Test::Version 1.09 +use Test::Version; + +my @imports = qw( version_all_ok ); + +my $params = { + is_strict => 0, + has_version => 1, + multiple => 0, + +}; + +push @imports, $params + if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); + +Test::Version->import(@imports); + +version_all_ok; +done_testing; diff -Nru liblog-any-adapter-log4perl-perl-0.08/xt/release/minimum-version.t liblog-any-adapter-log4perl-perl-0.09/xt/release/minimum-version.t --- liblog-any-adapter-log4perl-perl-0.08/xt/release/minimum-version.t 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/xt/release/minimum-version.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -#!perl - -use Test::More; - -eval "use Test::MinimumVersion"; -plan skip_all => "Test::MinimumVersion required for testing minimum versions" - if $@; -all_minimum_version_ok( qq{5.010} ); diff -Nru liblog-any-adapter-log4perl-perl-0.08/xt/release/pod-coverage.t liblog-any-adapter-log4perl-perl-0.09/xt/release/pod-coverage.t --- liblog-any-adapter-log4perl-perl-0.08/xt/release/pod-coverage.t 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/xt/release/pod-coverage.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -#!perl -# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. - -use Test::Pod::Coverage 1.08; -use Pod::Coverage::TrustPod; - -all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); diff -Nru liblog-any-adapter-log4perl-perl-0.08/xt/release/pod-syntax.t liblog-any-adapter-log4perl-perl-0.09/xt/release/pod-syntax.t --- liblog-any-adapter-log4perl-perl-0.08/xt/release/pod-syntax.t 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/xt/release/pod-syntax.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -#!perl -# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. -use Test::More; -use Test::Pod 1.41; - -all_pod_files_ok(); diff -Nru liblog-any-adapter-log4perl-perl-0.08/xt/release/portability.t liblog-any-adapter-log4perl-perl-0.09/xt/release/portability.t --- liblog-any-adapter-log4perl-perl-0.08/xt/release/portability.t 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/xt/release/portability.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -#!perl - -use strict; -use warnings; - -use Test::More; - -eval 'use Test::Portability::Files'; -plan skip_all => 'Test::Portability::Files required for testing portability' - if $@; -options(test_one_dot => 0); -run_tests(); diff -Nru liblog-any-adapter-log4perl-perl-0.08/xt/release/test-version.t liblog-any-adapter-log4perl-perl-0.09/xt/release/test-version.t --- liblog-any-adapter-log4perl-perl-0.08/xt/release/test-version.t 2015-04-04 18:06:28.000000000 +0000 +++ liblog-any-adapter-log4perl-perl-0.09/xt/release/test-version.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -use strict; -use warnings; -use Test::More; - -# generated by Dist::Zilla::Plugin::Test::Version 0.003001 -use Test::Version; - -my @imports = ( 'version_all_ok' ); - -my $params = { - is_strict => 0, - has_version => 1, -}; - -push @imports, $params - if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); - - -Test::Version->import(@imports); - -version_all_ok; -done_testing;