Skip to content

Commit 6a50825

Browse files
committed
fix console logging
1 parent a5dc636 commit 6a50825

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/MetaCPAN/Script/Runner.pm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ sub run {
2929
or File::Path::mkpath($path);
3030
}
3131

32+
if ( -t *STDERR ) {
33+
push @{ $config->{logger} },
34+
{
35+
class => 'Log::Log4perl::Appender::ScreenColoredLevels',
36+
stdout => 0,
37+
};
38+
}
39+
3240
my $obj = undef;
3341
my $ex = undef;
3442
try {

0 commit comments

Comments
 (0)