File: 51syslog.t

package info (click to toggle)
liblog-report-perl 1.40-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 568 kB
  • sloc: perl: 2,905; makefile: 8
file content (26 lines) | stat: -rw-r--r-- 590 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env perl
# Test syslog, but only mildly

use warnings;
use strict;

use Test::More;
use Log::Report undef, syntax => 'SHORT';

BEGIN
{   eval "require Sys::Syslog";
    plan skip_all => 'Sys::Syslog not installed'
        if $@;

    my $sv = Sys::Syslog->VERSION;
    eval { Sys::Syslog->VERSION(0.11) };
    plan skip_all => "Sys::Syslog too old (is $sv, requires 0.11)"
        if $@;

    plan tests => 1;
    use_ok('Log::Report::Dispatcher::Syslog');
}

dispatcher SYSLOG => 'syslog', to_prio => ['ALERT-' => 'err'];
dispatcher close => 'default';
notice "this is a test";