The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Test::Builder2::Event::Log - a logging event

DESCRIPTION

This is an Event representing a message not directly associated with a result. For example, informing the user which database the test is using.

This is modeled after syslog.

Methods

event_type

The event type is log

levels

    my @levels = $event->levels;

Returns the names of logging levels, as strings, in order from highest to lowest.

level_name

    my $name = $event->level_name;

Returns the name for the $event's level.

Attributes

message

The text associated with this log.

level

The severity level of this log, with 0 being the highest severity and 7 the lowest.

These are based on syslog levels.

     Emergency     (level 0)
     Alert         (level 1)
     Critical      (level 2)
     Error         (level 3)
     Warning       (level 4)
     Notice        (level 5)
     Info          (level 6)
     Debug         (level 7)

Defaults to 7, debug.