blob: 31447e507d0c6c499420a873493de5aeb3c93f94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
use strict;
use File::Temp qw( tempfile );
BEGIN {
if($ENV{INTERNAL_DEBUG}) {
require Log::Log4perl::InternalDebug;
Log::Log4perl::InternalDebug->enable();
}
}
my($tmpfh, $tempfile) = tempfile( UNLINK => 1 );
use Test::More;
BEGIN { plan tests => 1 };
use Log::Log4perl qw( :easy );
Log::Log4perl->easy_init( { level => $DEBUG, file => $tempfile } );
my $warnings = "";
$SIG{__WARN__} = sub {
$warnings .= $_[0];
};
DEBUG "foo", undef, "bar";
like $warnings, qr/Log message argument #2/, "warning for undef element issued";
|