File: default-adapter-params.t

package info (click to toggle)
liblog-any-perl 1.717-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 448 kB
  • sloc: perl: 1,499; makefile: 11
file content (19 lines) | stat: -rw-r--r-- 412 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use warnings;
use Test::More tests => 1;
use Log::Any;

{
    my $buf = '';
    open my $fh, ">", \$buf;
    local *STDERR = $fh;

    my $log = Log::Any->get_logger(
        default_adapter => ['Stderr', log_level => 'error']
    );
    # check if log_level spewas applied
    ok( 
        ( ! $log->is_warn and $log->is_error),
        "log_level specified in default_adapter was applied"
    );
}