Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Revision history for {{$dist->name}}

{{$NEXT}}
- Fix other syntax errors and typos in synopsis :(

0.06 2025-09-11 06:27:21 -0600
- Fixed incorrect capitalization in synopsis
Expand Down
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,31 @@ Append to TAP output

```perl
use Test2::V0;
use Log::Log4perl;
use Log::Log4perl qw( :easy );

Log::Log4perl::init(\<<CONF);
log4perl.rootLogger=ERROR, TAP
log4perl.appender.TAP=Log::Log4perl::Appender::TAP
log4perl.appender.TAP.method=diag
log4perl.appender.TAP=layout=PatternLayout
log4perl.appender.TAP=layout.ConversionPattern="[%rms] %m%n"
log4perl.appender.TAP.layout=PatternLayout
log4perl.appender.TAP.layout.ConversionPattern="[%rms] %m"
CONF

DEBUG "this message doesn't see the light of day";
ERROR "This gets logged to TAP using diag";

ok 1;

done_testing;
```

outputs:

```
# Seeded srand with seed '20250911' from local date.
# "[0ms] This gets logged to TAP using diag"
ok 1
1..1
```

# DESCRIPTION
Expand Down
17 changes: 14 additions & 3 deletions lib/Log/Log4perl/Appender/TAP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,29 @@ use parent qw( Log::Log4perl::Appender );
=head1 SYNOPSIS

use Test2::V0;
use Log::Log4perl;
use Log::Log4perl qw( :easy );

Log::Log4perl::init(\<<CONF);
log4perl.rootLogger=ERROR, TAP
log4perl.appender.TAP=Log::Log4perl::Appender::TAP
log4perl.appender.TAP.method=diag
log4perl.appender.TAP=layout=PatternLayout
log4perl.appender.TAP=layout.ConversionPattern="[%rms] %m%n"
log4perl.appender.TAP.layout=PatternLayout
log4perl.appender.TAP.layout.ConversionPattern="[%rms] %m"
CONF

DEBUG "this message doesn't see the light of day";
ERROR "This gets logged to TAP using diag";

ok 1;

done_testing;

outputs:

# Seeded srand with seed '20250911' from local date.
# "[0ms] This gets logged to TAP using diag"
ok 1
1..1

=head1 DESCRIPTION

Expand Down
Loading