Skip to content

Commit

Permalink
add set_adapter for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
jonswar committed Oct 31, 2009
1 parent c50c6d9 commit a33a1c8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ Revision history for Log-Any

0.06 Oct 27, 2009

* Fixes
- Implement Log::Any->set_adapter again for backward compatibility with 0.04 and earlier

0.05 Oct 27, 2009

* Implementation
- Strip Log::Any down to a relative minimum, so as to keep it stable and
- ** Strip Log::Any down to a relative minimum, so as to keep it stable and
unchanging. Move everything else to Log::Any::Adapter.

0.04 Sep 3, 2009
Expand Down
16 changes: 16 additions & 0 deletions xt/release/backcompat.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!perl
#
# Test old Log::Any->set_adapter API
#
use strict;
use warnings;
use Capture::Tiny qw/capture_merged/;
use Log::Any;
use Test::More tests => 1;

use Log::Dispatch;
my $log = Log::Dispatch->new(outputs => [['Screen', newline => 1, min_level => 'debug']]);
Log::Any->set_adapter('Dispatch', dispatcher => $log);
my $merged = capture_merged { $log->error("bleah") };
is($merged, "bleah\n", "got log");

0 comments on commit a33a1c8

Please sign in to comment.