Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-Log-Any for openSUSE:Factory checked in at 2022-12-13 18:56:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Log-Any (Old) and /work/SRC/openSUSE:Factory/.perl-Log-Any.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Log-Any" Tue Dec 13 18:56:23 2022 rev:29 rq:1042613 version:1.713 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Log-Any/perl-Log-Any.changes 2022-11-25 13:22:25.315442474 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Log-Any.new.1835/perl-Log-Any.changes 2022-12-13 18:56:37.563574311 +0100 @@ -1,0 +2,19 @@ +Mon Dec 12 20:20:48 UTC 2022 - Tina Müller <timueller+p...@suse.de> + +- updated to 1.713 + see /usr/share/doc/packages/perl-Log-Any/Changes + + 1.713 2022-12-12 12:44:52-06:00 America/Chicago + [Fixed] + - Fixed tests failing due to missing Devel::Stacktrace. This is an + optional module, so we do not explicitly depend on it. Thanks + @dbevans and @perlpunk for reporting this issue! (Github #93) + 1.712 2022-12-09 11:05:10-06:00 America/Chicago + [Added] + - Added `Log::Any::Proxy::WithStackTrace` to provide a stack trace at + the caller site. Thanks @larryl and @GrantStreetGroup for providing + this feature! + [Other] + - Removed Travis, as they stopped supporting free Github repos :( + +------------------------------------------------------------------- Old: ---- Log-Any-1.711.tar.gz New: ---- Log-Any-1.713.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Log-Any.spec ++++++ --- /var/tmp/diff_new_pack.Hv7b4z/_old 2022-12-13 18:56:37.995576616 +0100 +++ /var/tmp/diff_new_pack.Hv7b4z/_new 2022-12-13 18:56:37.999576638 +0100 @@ -18,7 +18,7 @@ %define cpan_name Log-Any Name: perl-Log-Any -Version: 1.711 +Version: 1.713 Release: 0 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Bringing loggers and listeners together ++++++ Log-Any-1.711.tar.gz -> Log-Any-1.713.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/Changes new/Log-Any-1.713/Changes --- old/Log-Any-1.711/Changes 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/Changes 2022-12-12 19:44:59.000000000 +0100 @@ -2,6 +2,26 @@ ** denotes an incompatible change +1.713 2022-12-12 12:44:52-06:00 America/Chicago + + [Fixed] + + - Fixed tests failing due to missing Devel::Stacktrace. This is an + optional module, so we do not explicitly depend on it. Thanks + @dbevans and @perlpunk for reporting this issue! (Github #93) + +1.712 2022-12-09 11:05:10-06:00 America/Chicago + + [Added] + + - Added `Log::Any::Proxy::WithStackTrace` to provide a stack trace at + the caller site. Thanks @larryl and @GrantStreetGroup for providing + this feature! + + [Other] + + - Removed Travis, as they stopped supporting free Github repos :( + 1.711 2022-11-22 11:28:01-06:00 America/Chicago [Fixed] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/MANIFEST new/Log-Any-1.713/MANIFEST --- old/Log-Any-1.711/MANIFEST 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/MANIFEST 2022-12-12 19:44:59.000000000 +0100 @@ -26,6 +26,7 @@ lib/Log/Any/Proxy.pm lib/Log/Any/Proxy/Null.pm lib/Log/Any/Proxy/Test.pm +lib/Log/Any/Proxy/WithStackTrace.pm lib/Log/Any/Test.pm t/00-compile.t t/00-report-prereqs.dd @@ -48,6 +49,7 @@ t/memory.t t/multiplex.t t/null-proxy.t +t/proxy-with-stack-trace.t t/proxy.t t/release-backcompat.t t/replace_log.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/META.json new/Log-Any-1.713/META.json --- old/Log-Any-1.711/META.json 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/META.json 2022-12-12 19:44:59.000000000 +0100 @@ -57,71 +57,75 @@ "provides" : { "Log::Any" : { "file" : "lib/Log/Any.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Adapter" : { "file" : "lib/Log/Any/Adapter.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Adapter::Base" : { "file" : "lib/Log/Any/Adapter/Base.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Adapter::Capture" : { "file" : "lib/Log/Any/Adapter/Capture.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Adapter::File" : { "file" : "lib/Log/Any/Adapter/File.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Adapter::Multiplex" : { "file" : "lib/Log/Any/Adapter/Multiplex.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Adapter::Null" : { "file" : "lib/Log/Any/Adapter/Null.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Adapter::Stderr" : { "file" : "lib/Log/Any/Adapter/Stderr.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Adapter::Stdout" : { "file" : "lib/Log/Any/Adapter/Stdout.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Adapter::Syslog" : { "file" : "lib/Log/Any/Adapter/Syslog.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Adapter::Test" : { "file" : "lib/Log/Any/Adapter/Test.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Adapter::Util" : { "file" : "lib/Log/Any/Adapter/Util.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Manager" : { "file" : "lib/Log/Any/Manager.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Proxy" : { "file" : "lib/Log/Any/Proxy.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Proxy::Null" : { "file" : "lib/Log/Any/Proxy/Null.pm", - "version" : "1.711" + "version" : "1.713" }, "Log::Any::Proxy::Test" : { "file" : "lib/Log/Any/Proxy/Test.pm", - "version" : "1.711" + "version" : "1.713" + }, + "Log::Any::Proxy::WithStackTrace" : { + "file" : "lib/Log/Any/Proxy/WithStackTrace.pm", + "version" : "1.713" }, "Log::Any::Test" : { "file" : "lib/Log/Any/Test.pm", - "version" : "1.711" + "version" : "1.713" } }, "release_status" : "stable", @@ -136,7 +140,7 @@ "web" : "https://github.com/preaction/Log-Any" } }, - "version" : "1.711", + "version" : "1.713", "x_authority" : "cpan:PREACTION", "x_contributors" : [ "Andrew Grechkin <andrew.grech...@gmail.com>", @@ -146,6 +150,7 @@ "Jonathan <jjrs.pam+git...@gmail.com>", "Karen Etheridge <et...@cpan.org>", "Konstantin S. Uvarin <khe...@gmail.com>", + "Larry Leszczynski <lar...@cpan.org>", "Lucas Kanashiro <kanashiro.dua...@gmail.com>", "Maros Kollar <maros.kol...@geizhals.at>", "Maxim Vuets <maxim.vu...@booking.com>", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/META.yml new/Log-Any-1.713/META.yml --- old/Log-Any-1.711/META.yml 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/META.yml 2022-12-12 19:44:59.000000000 +0100 @@ -34,60 +34,63 @@ provides: Log::Any: file: lib/Log/Any.pm - version: '1.711' + version: '1.713' Log::Any::Adapter: file: lib/Log/Any/Adapter.pm - version: '1.711' + version: '1.713' Log::Any::Adapter::Base: file: lib/Log/Any/Adapter/Base.pm - version: '1.711' + version: '1.713' Log::Any::Adapter::Capture: file: lib/Log/Any/Adapter/Capture.pm - version: '1.711' + version: '1.713' Log::Any::Adapter::File: file: lib/Log/Any/Adapter/File.pm - version: '1.711' + version: '1.713' Log::Any::Adapter::Multiplex: file: lib/Log/Any/Adapter/Multiplex.pm - version: '1.711' + version: '1.713' Log::Any::Adapter::Null: file: lib/Log/Any/Adapter/Null.pm - version: '1.711' + version: '1.713' Log::Any::Adapter::Stderr: file: lib/Log/Any/Adapter/Stderr.pm - version: '1.711' + version: '1.713' Log::Any::Adapter::Stdout: file: lib/Log/Any/Adapter/Stdout.pm - version: '1.711' + version: '1.713' Log::Any::Adapter::Syslog: file: lib/Log/Any/Adapter/Syslog.pm - version: '1.711' + version: '1.713' Log::Any::Adapter::Test: file: lib/Log/Any/Adapter/Test.pm - version: '1.711' + version: '1.713' Log::Any::Adapter::Util: file: lib/Log/Any/Adapter/Util.pm - version: '1.711' + version: '1.713' Log::Any::Manager: file: lib/Log/Any/Manager.pm - version: '1.711' + version: '1.713' Log::Any::Proxy: file: lib/Log/Any/Proxy.pm - version: '1.711' + version: '1.713' Log::Any::Proxy::Null: file: lib/Log/Any/Proxy/Null.pm - version: '1.711' + version: '1.713' Log::Any::Proxy::Test: file: lib/Log/Any/Proxy/Test.pm - version: '1.711' + version: '1.713' + Log::Any::Proxy::WithStackTrace: + file: lib/Log/Any/Proxy/WithStackTrace.pm + version: '1.713' Log::Any::Test: file: lib/Log/Any/Test.pm - version: '1.711' + version: '1.713' resources: bugtracker: https://github.com/preaction/Log-Any/issues homepage: https://github.com/preaction/Log-Any repository: https://github.com/preaction/Log-Any.git -version: '1.711' +version: '1.713' x_authority: cpan:PREACTION x_contributors: - 'Andrew Grechkin <andrew.grech...@gmail.com>' @@ -97,6 +100,7 @@ - 'Jonathan <jjrs.pam+git...@gmail.com>' - 'Karen Etheridge <et...@cpan.org>' - 'Konstantin S. Uvarin <khe...@gmail.com>' + - 'Larry Leszczynski <lar...@cpan.org>' - 'Lucas Kanashiro <kanashiro.dua...@gmail.com>' - 'Maros Kollar <maros.kol...@geizhals.at>' - 'Maxim Vuets <maxim.vu...@booking.com>' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/Makefile.PL new/Log-Any-1.713/Makefile.PL --- old/Log-Any-1.711/Makefile.PL 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/Makefile.PL 2022-12-12 19:44:59.000000000 +0100 @@ -23,7 +23,7 @@ "IPC::Open3" => 0, "Test::More" => 0 }, - "VERSION" => "1.711", + "VERSION" => "1.713", "test" => { "TESTS" => "t/*.t" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Adapter/Base.pm new/Log-Any-1.713/lib/Log/Any/Adapter/Base.pm --- old/Log-Any-1.711/lib/Log/Any/Adapter/Base.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Adapter/Base.pm 2022-12-12 19:44:59.000000000 +0100 @@ -4,7 +4,7 @@ package Log::Any::Adapter::Base; -our $VERSION = '1.711'; +our $VERSION = '1.713'; our @CARP_NOT = ( 'Log::Any::Adapter' ); # we import these in case any legacy adapter uses them as class methods @@ -52,7 +52,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Adapter/Capture.pm new/Log-Any-1.713/lib/Log/Any/Adapter/Capture.pm --- old/Log-Any-1.711/lib/Log/Any/Adapter/Capture.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Adapter/Capture.pm 2022-12-12 19:44:59.000000000 +0100 @@ -5,7 +5,7 @@ package Log::Any::Adapter::Capture; # ABSTRACT: Adapter for capturing log messages into an arrayref -our $VERSION = '1.711'; +our $VERSION = '1.713'; use Log::Any::Adapter::Util (); @@ -114,7 +114,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Adapter/Development.pod new/Log-Any-1.713/lib/Log/Any/Adapter/Development.pod --- old/Log-Any-1.711/lib/Log/Any/Adapter/Development.pod 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Adapter/Development.pod 2022-12-12 19:44:59.000000000 +0100 @@ -16,7 +16,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Adapter/File.pm new/Log-Any-1.713/lib/Log/Any/Adapter/File.pm --- old/Log-Any-1.711/lib/Log/Any/Adapter/File.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Adapter/File.pm 2022-12-12 19:44:59.000000000 +0100 @@ -5,7 +5,7 @@ package Log::Any::Adapter::File; # ABSTRACT: Simple adapter for logging to files -our $VERSION = '1.711'; +our $VERSION = '1.713'; use Config; use Fcntl qw/:flock/; @@ -80,7 +80,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Adapter/Multiplex.pm new/Log-Any-1.713/lib/Log/Any/Adapter/Multiplex.pm --- old/Log-Any-1.711/lib/Log/Any/Adapter/Multiplex.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Adapter/Multiplex.pm 2022-12-12 19:44:59.000000000 +0100 @@ -1,6 +1,6 @@ package Log::Any::Adapter::Multiplex; # ABSTRACT: Adapter to use allow structured logging across other adapters -our $VERSION = '1.711'; +our $VERSION = '1.713'; use Log::Any; use Log::Any::Adapter; @@ -116,7 +116,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Adapter/Null.pm new/Log-Any-1.713/lib/Log/Any/Adapter/Null.pm --- old/Log-Any-1.711/lib/Log/Any/Adapter/Null.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Adapter/Null.pm 2022-12-12 19:44:59.000000000 +0100 @@ -5,7 +5,7 @@ package Log::Any::Adapter::Null; # ABSTRACT: Discards all log messages -our $VERSION = '1.711'; +our $VERSION = '1.713'; use Log::Any::Adapter::Base; our @ISA = qw/Log::Any::Adapter::Base/; @@ -33,7 +33,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Adapter/Stderr.pm new/Log-Any-1.713/lib/Log/Any/Adapter/Stderr.pm --- old/Log-Any-1.711/lib/Log/Any/Adapter/Stderr.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Adapter/Stderr.pm 2022-12-12 19:44:59.000000000 +0100 @@ -5,7 +5,7 @@ package Log::Any::Adapter::Stderr; # ABSTRACT: Simple adapter for logging to STDERR -our $VERSION = '1.711'; +our $VERSION = '1.713'; use Log::Any::Adapter::Util (); @@ -62,7 +62,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Adapter/Stdout.pm new/Log-Any-1.713/lib/Log/Any/Adapter/Stdout.pm --- old/Log-Any-1.711/lib/Log/Any/Adapter/Stdout.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Adapter/Stdout.pm 2022-12-12 19:44:59.000000000 +0100 @@ -5,7 +5,7 @@ package Log::Any::Adapter::Stdout; # ABSTRACT: Simple adapter for logging to STDOUT -our $VERSION = '1.711'; +our $VERSION = '1.713'; use Log::Any::Adapter::Util (); @@ -62,7 +62,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Adapter/Syslog.pm new/Log-Any-1.713/lib/Log/Any/Adapter/Syslog.pm --- old/Log-Any-1.711/lib/Log/Any/Adapter/Syslog.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Adapter/Syslog.pm 2022-12-12 19:44:59.000000000 +0100 @@ -5,7 +5,7 @@ package Log::Any::Adapter::Syslog; # ABSTRACT: Send Log::Any logs to syslog -our $VERSION = '1.711'; +our $VERSION = '1.713'; use Log::Any::Adapter::Util qw{make_method}; use base qw{Log::Any::Adapter::Base}; @@ -141,7 +141,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Adapter/Test.pm new/Log-Any-1.713/lib/Log/Any/Adapter/Test.pm --- old/Log-Any-1.711/lib/Log/Any/Adapter/Test.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Adapter/Test.pm 2022-12-12 19:44:59.000000000 +0100 @@ -4,7 +4,7 @@ package Log::Any::Adapter::Test; -our $VERSION = '1.711'; +our $VERSION = '1.713'; use Log::Any::Adapter::Util qw/dump_one_line/; use Test::Builder; @@ -218,7 +218,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Adapter/Util.pm new/Log-Any-1.713/lib/Log/Any/Adapter/Util.pm --- old/Log-Any-1.711/lib/Log/Any/Adapter/Util.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Adapter/Util.pm 2022-12-12 19:44:59.000000000 +0100 @@ -5,7 +5,7 @@ package Log::Any::Adapter::Util; # ABSTRACT: Common utility functions for Log::Any -our $VERSION = '1.711'; +our $VERSION = '1.713'; use Exporter; our @ISA = qw/Exporter/; @@ -241,7 +241,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Adapter.pm new/Log-Any-1.713/lib/Log/Any/Adapter.pm --- old/Log-Any-1.711/lib/Log/Any/Adapter.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Adapter.pm 2022-12-12 19:44:59.000000000 +0100 @@ -5,7 +5,7 @@ package Log::Any::Adapter; # ABSTRACT: Tell Log::Any where to send its logs -our $VERSION = '1.711'; +our $VERSION = '1.713'; use Log::Any; our @CARP_NOT = ( 'Log::Any::Manager' ); @@ -44,7 +44,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Manager.pm new/Log-Any-1.713/lib/Log/Any/Manager.pm --- old/Log-Any-1.711/lib/Log/Any/Manager.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Manager.pm 2022-12-12 19:44:59.000000000 +0100 @@ -4,7 +4,7 @@ package Log::Any::Manager; -our $VERSION = '1.711'; +our $VERSION = '1.713'; sub new { my $class = shift; @@ -248,7 +248,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Proxy/Null.pm new/Log-Any-1.713/lib/Log/Any/Proxy/Null.pm --- old/Log-Any-1.711/lib/Log/Any/Proxy/Null.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Proxy/Null.pm 2022-12-12 19:44:59.000000000 +0100 @@ -5,7 +5,7 @@ package Log::Any::Proxy::Null; # ABSTRACT: Log::Any generator proxy for no adapters -our $VERSION = '1.711'; +our $VERSION = '1.713'; use Log::Any::Adapter::Util (); use Log::Any::Proxy; @@ -57,7 +57,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Proxy/Test.pm new/Log-Any-1.713/lib/Log/Any/Proxy/Test.pm --- old/Log-Any-1.711/lib/Log/Any/Proxy/Test.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Proxy/Test.pm 2022-12-12 19:44:59.000000000 +0100 @@ -4,7 +4,7 @@ package Log::Any::Proxy::Test; -our $VERSION = '1.711'; +our $VERSION = '1.713'; use Log::Any::Proxy; our @ISA = qw/Log::Any::Proxy/; @@ -42,7 +42,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 AUTHORS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Proxy/WithStackTrace.pm new/Log-Any-1.713/lib/Log/Any/Proxy/WithStackTrace.pm --- old/Log-Any-1.711/lib/Log/Any/Proxy/WithStackTrace.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Proxy/WithStackTrace.pm 2022-12-12 19:44:59.000000000 +0100 @@ -0,0 +1,212 @@ +use 5.008001; +use strict; +use warnings; + +package Log::Any::Proxy::WithStackTrace; + +# ABSTRACT: Log::Any proxy to upgrade string errors to objects with stack traces +our $VERSION = '1.713'; + +use Log::Any::Proxy; +our @ISA = qw/Log::Any::Proxy/; + +use Devel::StackTrace 2.00; +use Log::Any::Adapter::Util (); +use overload; + +#pod =head1 SYNOPSIS +#pod +#pod use Log::Any qw( $log, proxy_class => 'WithStackTrace' ); +#pod +#pod # Some adapter that knows how to handle both structured data, +#pod # and log messages which are actually objects with a +#pod # "stack_trace" method: +#pod # +#pod Log::Any::Adapter->set($adapter); +#pod +#pod $log->error("Help!"); # stack trace gets automatically added +#pod +#pod =head1 DESCRIPTION +#pod +#pod Some log adapters, like L<Log::Any::Adapter::Sentry::Raven>, are able to +#pod take advantage of being passed message objects that contain a stack +#pod trace. However if a stack trace is not available, and fallback logic is +#pod used to generate one, the resulting trace can be confusing if it begins +#pod relative to where the log adapter was called, and not relative to where +#pod the logging method was originally called. +#pod +#pod With this proxy in place, if any logging method is called with a message +#pod that is a non-reference scalar, that message will be upgraded into a +#pod C<Log::Any::MessageWithStackTrace> object with a C<stack_trace> method, +#pod and that method will return a trace relative to where the logging method +#pod was called. A string overload is provided on the object to return the +#pod original message. +#pod +#pod B<Important:> This proxy should be used with a L<Log::Any::Adapter> that +#pod is configured to handle structured data. Otherwise the object created +#pod here will just get stringified before it can be used to access the stack +#pod trace. +#pod +#pod =cut + +{ + package # hide from PAUSE indexer + Log::Any::MessageWithStackTrace; + + use overload '""' => \&stringify; + + use Carp qw( croak ); + + sub new + { + my ($class, $message) = @_; + croak 'no "message"' unless defined $message; + return bless { + message => $message, + stack_trace => Devel::StackTrace->new( + # Filter e.g "Log::Any::Proxy", "My::Log::Any::Proxy", etc. + ignore_package => [ qr/(?:^|::)Log::Any(?:::|$)/ ], + ), + }, $class; + } + + sub stringify { $_[0]->{message} } + + sub stack_trace { $_[0]->{stack_trace} } +} + +#pod =head1 METHODS +#pod +#pod =head2 maybe_upgrade_with_stack_trace +#pod +#pod This is an internal use method that will convert a non-reference scalar +#pod message into a C<Log::Any::MessageWithStackTrace> object with a +#pod C<stack_trace> method. A string overload is provided to return the +#pod original message. +#pod +#pod =cut + +sub maybe_upgrade_with_stack_trace +{ + my ($self, @args) = @_; + + # Only want a non-ref arg, optionally followed by a structured data + # context hashref: + # + return @args unless @args == 1 || + ( @args == 2 && ref $args[1] eq 'HASH' ); + return @args if ref $args[0]; + + $args[0] = Log::Any::MessageWithStackTrace->new($args[0]); + + return @args; +} + +my %aliases = Log::Any::Adapter::Util::log_level_aliases(); + +# Set up methods/aliases and detection methods/aliases +foreach my $name ( Log::Any::Adapter::Util::logging_methods(), keys(%aliases) ) +{ + my $super_name = "SUPER::" . $name; + no strict 'refs'; + *{$name} = sub { + my ($self, @args) = @_; + @args = $self->maybe_upgrade_with_stack_trace(@args); + my $response = $self->$super_name(@args); + return $response if defined wantarray; + return; + }; +} + +1; + +__END__ + +=pod + +=encoding UTF-8 + +=head1 NAME + +Log::Any::Proxy::WithStackTrace - Log::Any proxy to upgrade string errors to objects with stack traces + +=head1 VERSION + +version 1.713 + +=head1 SYNOPSIS + + use Log::Any qw( $log, proxy_class => 'WithStackTrace' ); + + # Some adapter that knows how to handle both structured data, + # and log messages which are actually objects with a + # "stack_trace" method: + # + Log::Any::Adapter->set($adapter); + + $log->error("Help!"); # stack trace gets automatically added + +=head1 DESCRIPTION + +Some log adapters, like L<Log::Any::Adapter::Sentry::Raven>, are able to +take advantage of being passed message objects that contain a stack +trace. However if a stack trace is not available, and fallback logic is +used to generate one, the resulting trace can be confusing if it begins +relative to where the log adapter was called, and not relative to where +the logging method was originally called. + +With this proxy in place, if any logging method is called with a message +that is a non-reference scalar, that message will be upgraded into a +C<Log::Any::MessageWithStackTrace> object with a C<stack_trace> method, +and that method will return a trace relative to where the logging method +was called. A string overload is provided on the object to return the +original message. + +B<Important:> This proxy should be used with a L<Log::Any::Adapter> that +is configured to handle structured data. Otherwise the object created +here will just get stringified before it can be used to access the stack +trace. + +=head1 METHODS + +=head2 maybe_upgrade_with_stack_trace + +This is an internal use method that will convert a non-reference scalar +message into a C<Log::Any::MessageWithStackTrace> object with a +C<stack_trace> method. A string overload is provided to return the +original message. + +=head1 AUTHORS + +=over 4 + +=item * + +Jonathan Swartz <swa...@pobox.com> + +=item * + +David Golden <dagol...@cpan.org> + +=item * + +Doug Bell <preact...@cpan.org> + +=item * + +Daniel Pittman <dan...@rimspace.net> + +=item * + +Stephen Thirlwall <s...@cpan.org> + +=back + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2017 by Jonathan Swartz, David Golden, and Doug Bell. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +=cut diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Proxy.pm new/Log-Any-1.713/lib/Log/Any/Proxy.pm --- old/Log-Any-1.711/lib/Log/Any/Proxy.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Proxy.pm 2022-12-12 19:44:59.000000000 +0100 @@ -5,7 +5,7 @@ package Log::Any::Proxy; # ABSTRACT: Log::Any generator proxy object -our $VERSION = '1.711'; +our $VERSION = '1.713'; use Log::Any::Adapter::Util (); use overload; @@ -150,7 +150,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any/Test.pm new/Log-Any-1.713/lib/Log/Any/Test.pm --- old/Log-Any-1.711/lib/Log/Any/Test.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any/Test.pm 2022-12-12 19:44:59.000000000 +0100 @@ -5,7 +5,7 @@ package Log::Any::Test; # ABSTRACT: Test what you're logging with Log::Any -our $VERSION = '1.711'; +our $VERSION = '1.713'; no warnings 'once'; $Log::Any::OverrideDefaultAdapterClass = 'Log::Any::Adapter::Test'; @@ -25,7 +25,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/lib/Log/Any.pm new/Log-Any-1.713/lib/Log/Any.pm --- old/Log-Any-1.711/lib/Log/Any.pm 2022-11-22 18:28:08.000000000 +0100 +++ new/Log-Any-1.713/lib/Log/Any.pm 2022-12-12 19:44:59.000000000 +0100 @@ -5,7 +5,7 @@ package Log::Any; # ABSTRACT: Bringing loggers and listeners together -our $VERSION = '1.711'; +our $VERSION = '1.713'; use Log::Any::Manager; use Log::Any::Proxy::Null; @@ -135,7 +135,7 @@ =head1 VERSION -version 1.711 +version 1.713 =head1 SYNOPSIS @@ -478,7 +478,7 @@ =head1 CONTRIBUTORS -=for stopwords Andrew Grechkin bj5004 cm-perl Doug Bell Jonathan Karen Etheridge Konstantin S. Uvarin Lucas Kanashiro Maros Kollar Maxim Vuets mephinet Michael Conrad Nick Tonkin Paul Durden Philipp Gortan Phill Legault Shlomi Fish Sven Willenbuecher XSven +=for stopwords Andrew Grechkin bj5004 cm-perl Doug Bell Jonathan Karen Etheridge Konstantin S. Uvarin Larry Leszczynski Lucas Kanashiro Maros Kollar Maxim Vuets mephinet Michael Conrad Nick Tonkin Paul Durden Philipp Gortan Phill Legault Shlomi Fish Sven Willenbuecher XSven =over 4 @@ -512,6 +512,10 @@ =item * +Larry Leszczynski <lar...@cpan.org> + +=item * + Lucas Kanashiro <kanashiro.dua...@gmail.com> =item * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Log-Any-1.711/t/proxy-with-stack-trace.t new/Log-Any-1.713/t/proxy-with-stack-trace.t --- old/Log-Any-1.711/t/proxy-with-stack-trace.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Log-Any-1.713/t/proxy-with-stack-trace.t 2022-12-12 19:44:59.000000000 +0100 @@ -0,0 +1,139 @@ + +use strict; +use warnings; +use Test::More; +use Log::Any; + +plan tests => 48; + +use FindBin; +use lib $FindBin::RealBin; +use TestAdapters; + +BEGIN { + eval { + require Devel::StackTrace; + Devel::StackTrace->VERSION( 2.00 ); + }; + if ( $@ ) { + plan skip_all => 'Devel::StackTrace >= 2.00 is required for this test'; + } + else { + eval { + require Storable; + Storable->VERSION( 3.08 ); + }; + if ( $@ ) { + plan skip_all => 'Storable >= 3.08 is required for this test'; + } + } +} + +use Log::Any::Proxy::WithStackTrace; # necessary? + +my $default_log = Log::Any->get_logger; +my $log = Log::Any->get_logger( proxy_class => 'WithStackTrace' ); + +is ref $default_log, 'Log::Any::Proxy::Null', + 'no adapter default proxy is Null'; +is ref $log, 'Log::Any::Proxy::WithStackTrace', + 'no adapter explicit proxy is WithStackTrace'; + +$default_log->info("test"); +$log ->info("test"); + +is ref $default_log, 'Log::Any::Proxy::Null', + 'no adapter default proxy is still Null after logging'; +is ref $log, 'Log::Any::Proxy::WithStackTrace', + 'no adapter explicit proxy is still WithStackTrace after logging'; + +Log::Any->set_adapter('+TestAdapters::Structured'); + +is ref $default_log, 'Log::Any::Proxy', + 'existing default proxy is reblessed after adapter'; +is ref $log, 'Log::Any::Proxy::WithStackTrace', + 'existing explicit proxy is still WithStackTrace after adapter'; + +is ref $default_log->adapter, 'TestAdapters::Structured', + 'existing default proxy has correct adapter'; +is ref $log->adapter, 'TestAdapters::Structured', + 'existing explicit proxy has correct adapter'; + +my @test_cases = ( + [ + 'simple', + [ 'test' ], + 'test', + ], + [ + 'with structured data', + [ 'test', { foo => 1 } ], + 'test', + ], + [ + 'formatted', + [ 'test %s', 'extra' ], + 'test extra', + ], +); + +sub check_test_cases { + foreach my $test_case (@test_cases) { + my ($desc, $args, $expected) = @$test_case; + + my $is_formatted = $args->[0] =~ /%/; + + my $method = $is_formatted ? 'infof' : 'info'; + + my ($msgs, $msg); + + my $type = 'default'; + + @TestAdapters::STRUCTURED_LOG = (); + $default_log->$method(@$args); + $msgs = \@TestAdapters::STRUCTURED_LOG; + is @$msgs, 1, "$desc expected number of structured messages from $type logger"; + is $msgs->[0]->{category}, 'main', + "$desc expected category from $type logger"; + is $msgs->[0]->{level}, 'info', + "$desc expected level from $type logger"; + $msg = $msgs->[0]->{messages}->[0]; # "messages" for text + is $msg, $expected, + "$desc expected message from $type logger"; + + $type = 'stack trace'; + + @TestAdapters::STRUCTURED_LOG = (); + $log->$method(@$args); + $msgs = \@TestAdapters::STRUCTURED_LOG; + is @$msgs, 1, "$desc expected number of structured messages from $type logger"; + is $msgs->[0]->{category}, 'main', + "$desc expected category from $type logger"; + is $msgs->[0]->{level}, 'info', + "$desc expected level from $type logger"; + $msg = $msgs->[0]->{data}->[0]; # "data" for non-text + is ref $msg, 'Log::Any::MessageWithStackTrace', + "$desc expected message object from $type logger"; + is "$msg", $expected, + "$desc expected stringified message from $type logger"; + my $trace = $msg->stack_trace; + is ref $trace, 'Devel::StackTrace', + "$desc expected stack_trace object from $type logger"; + is $trace->frame_count, 2, + "$desc stack_trace object has expected number of frames from $type logger"; + # first frame should be the call to "info" inside this sub (19 lines up), + # second frame should be the call to this sub from main + is $trace->frame(0)->line, __LINE__ - 19, + "$desc stack_trace object has expected first frame from $type logger"; + is $trace->frame(1)->subroutine, 'main::check_test_cases', + "$desc stack_trace object has expected second frame from $type logger"; + if (!$is_formatted && @$args > 1) { + my $more_data = $msgs->[0]->{data}->[1]; + is_deeply $more_data, $args->[1], + "expected structured data from $type logger"; + } + } +} + +check_test_cases(); +