Jifty::Event::Log - An event that L<Jifty::Logger::EventAppender> creates


Jifty documentation Contained in the Jifty distribution.

Index


Code Index:

NAME

Top

Jifty::Event::Log - An event that Jifty::Logger::EventAppender creates

DESCRIPTION

Top

This Jifty::Event is created when a log message happens.

METHODS

Top

match QUERY

Matches only if all of the keys in the query exist in the data, and the values of the keys match the respective values in the data.

render_arguments

All of the data is dumped into the rendered arguments, verbatim.


Jifty documentation Contained in the Jifty distribution.
package Jifty::Event::Log;
use strict;
use warnings;
use base qw/Jifty::Event/;

sub match {
    my $self    = shift;
    my $query   = shift;

    for my $key (keys %{$query}) {
        return unless defined $self->data->{$key} and $self->data->{$key} eq $query->{$key};
    }

    return 1;
}

sub render_arguments {
    my $self = shift;
    return ( %{ $self->data } );
}

1;