Skip to content

Commit

Permalink
new
Browse files Browse the repository at this point in the history
  • Loading branch information
jonswar committed Jul 8, 2009
1 parent 716806d commit 6c52b1f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
12 changes: 12 additions & 0 deletions git/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = [email protected]:jonswar/perl-log-any.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
merge = master
remote = origin
28 changes: 28 additions & 0 deletions t/sprintf.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!perl
use Test::More tests => 1;
use Test::Deep qw(cmp_deeply);
use Log::Any;
use strict;
use warnings;

Log::Any->set_adapter('+Log::Any::Test::Adapter::Memory');
my $log = Log::Any->get_logger();
my @params = ( "args for %s: %s", 'app', [ 'foo', { 'bar' => 5 } ] );
$log->info(@params);
$log->debugf(@params);
cmp_deeply(
$log->{msgs},
[
{
text => "args for %s: %s",
level => 'info',
category => 'main'
},
{
text => "args for app: ['foo',{bar => 5}]",
level => 'debug',
category => 'main'
}
],
'message was formatted'
);

0 comments on commit 6c52b1f

Please sign in to comment.