1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#! /usr/bin/perl
use strict;
use warnings;
use Test::More;
use Log::Any '$log';
use Log::Any::Adapter;
use FindBin;
use lib "$FindBin::Bin/lib";
use TestLogging;
$SIG{__DIE__}= $SIG{__WARN__}= sub { diag @_; };
my ($stdout, $stderr)= capture_output {
Log::Any::Adapter->set('TAP', dumper => sub { "foo" } );
# construct additional adapters
Log::Any->get_logger('foo');
Log::Any->get_logger('bar');
};
like( $stdout, qr/\n# notice: Custom 'dumper' will not work with Log::Any versions >= 0.9\n$/s, 'exactly one warning' );
done_testing;
|