4
# $Id: 06-handle-output.t 45 2008-05-07 22:06:40Z cfuhrman $
7
use Test::Simple tests => 6;
10
use Log::BSDLog::Handle::Output;
14
my $msg = "This output is expected as part of the test. Please ignore.";
17
my $log = Log::BSDLog->getLogger("handleoutput0");
19
ok(ref $log eq "Log::BSDLog::Logger");
21
# add a handle. Note we use the default formatter.
22
my $handle = Log::BSDLog::Handle::Output->new({ use_stderr => 1, });
25
ok($handle->isa("Log::BSDLog::Handle"));
27
# these should be set to their default values
28
ok($handle->{mask} == Log::BSDLog::Handle->DEFAULT_LOGMASK);
29
ok($handle->{level} == DEBG);
30
ok($handle->{formatter}->isa("Log::BSDLog::Formatter::Basic"));
32
# Output-specific attributes
33
ok($handle->{use_stderr});
35
# write a test message
36
$handle->msgWrite(INFO, "\n\n$msg\n\n", 1);