<<

NAME

Koha::Illrequest::Logger - Koha ILL Action / Event logger

SYNOPSIS

Object-oriented class that provides event logging functionality for ILL requests

DESCRIPTION

This class provides the ability to log arbitrary actions or events relating to Illrequest to the action log.

API

Class Methods

new

    my $config = Koha::Illrequest::Logger->new();

Create a new Koha::Illrequest::Logger object. We also set up what can be logged, how to do it and how to display log entries we get back out

log_maybe

    Koha::IllRequest::Logger->log_maybe($params);

Receive params hashref, containing a request object and an attrs hashref (which may or may not be defined) If the attrs hashref contains a key matching our "loggers" hashref then we want to log it

log_status_change

    Koha::IllRequest::Logger->log_status_change($params);

Receive a hashref containing a request object and a status to log, and log it

log_something

    Koha::IllRequest::Logger->log_something({
        modulename   => 'ILL',
        actionname   => 'STATUS_CHANGE',
        objectnumber => $req->id,
        infos        => to_json({
            log_origin    => 'core',
            status_before => $req->{previous_status},
            status_after  => $new_status
        })
    });

If we have the required data passed, log an action

get_log_template

    $template_path = get_log_template($params);

Given a log's origin and action, get the appropriate display template

get_request_logs

    $requestlogs = Koha::IllRequest::Logger->get_request_logs($request_id);

Get all logged actions for a given request

AUTHOR

Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

<<