Koha::ILL::ILL::Request::Logger - Koha ILL Action / Event logger
Object-oriented class that provides event logging functionality for ILL requests
This class provides the ability to log arbitrary actions or events relating to Illrequest to the action log.
my $config = Koha::ILL::Request::Logger->new();
Create a new Koha::ILL::Request::Logger object . We also set up what can be logged, how to do it and how to display log entries we get back out
Koha::ILL::Request::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
Koha::ILL::Request::Logger->log_patron_notice($params);
Receive a hashref containing a request object and params to log, and log it
Koha::ILL::Request::Logger->log_status_change($params);
Receive a hashref containing a request object and a status to log, and log it
Koha::ILL::Request::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
$template_path = get_log_template($params);
Given a log's origin and action, get the appropriate display template
$requestlogs = Koha::ILL::Request::Logger->get_request_logs($request_id);
Get all logged actions for a given request
Andrew Isherwood <andrew.isherwood@ptfs-europe.com>