Skip to content

Commit 6c52b1f

Browse files
committed
new
1 parent 716806d commit 6c52b1f

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

git/config

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[core]
2+
repositoryformatversion = 0
3+
filemode = true
4+
bare = false
5+
logallrefupdates = true
6+
ignorecase = true
7+
[remote "origin"]
8+
url = [email protected]:jonswar/perl-log-any.git
9+
fetch = +refs/heads/*:refs/remotes/origin/*
10+
[branch "master"]
11+
merge = master
12+
remote = origin

t/sprintf.t

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!perl
2+
use Test::More tests => 1;
3+
use Test::Deep qw(cmp_deeply);
4+
use Log::Any;
5+
use strict;
6+
use warnings;
7+
8+
Log::Any->set_adapter('+Log::Any::Test::Adapter::Memory');
9+
my $log = Log::Any->get_logger();
10+
my @params = ( "args for %s: %s", 'app', [ 'foo', { 'bar' => 5 } ] );
11+
$log->info(@params);
12+
$log->debugf(@params);
13+
cmp_deeply(
14+
$log->{msgs},
15+
[
16+
{
17+
text => "args for %s: %s",
18+
level => 'info',
19+
category => 'main'
20+
},
21+
{
22+
text => "args for app: ['foo',{bar => 5}]",
23+
level => 'debug',
24+
category => 'main'
25+
}
26+
],
27+
'message was formatted'
28+
);

0 commit comments

Comments
 (0)