$app->verbosity

Return the verbosity of this app.

Arguments

None.

Returns

The value of either _verbose or _v

$app->log_warn($fmt, @values)

prinf $fmt, @values to the currently selected filehandle.

Arguments

Positional.

$fmt => a (s)printf format

The format gets an extra new line if one wasn't present.

@values => optional vaules for the template.

Returns

use in void context.

Exceptions

None.

$app->log_info($fmt, @values)

prinf $fmt, @values to the currently selected filehandle if the 'verbose' option is set.

Arguments

Positional.

$fmt => a (s)printf format

The format gets an extra new line if one wasn't present.

@values => optional vaules for the template.

Returns

use in void context.

Exceptions

None.

$app->log_debug($fmt, @values)

prinf $fmt, @values to the currently selected filehandle if the 'verbose' option is set to a value > 1.

Arguments

Positional.

$fmt => a (s)printf format

The format gets an extra new line if one wasn't present.

@values => optional vaules for the template.

Returns

use in void context.

Exceptions

None.

NAME

Test::Smoke::Logger - Helper object for logging.

SYNOPSIS

use Test::Smoke::LogMixin;
my $logger = Test::Smoke::Logger->new(v => 1);
$logger->log_warn("Minimal log level"); # v >= 0
$logger->log_info("Medium log level");  # v <= 1
$logger->log_debug("High log level");   # v >  1

DESCRIPTION

Test::Smoke::Logger->new(%arguments)

Return a logger instance.

Arguments

Named, hash:

v => <0|1|2>

Returns

The Test::Smoke::Logger instance.