webmin/at/log_parser.pl

28 lines
625 B
Perl
Raw Permalink Normal View History

2009-09-26 10:33:48 -07:00
# log_parser.pl
# Functions for parsing this module's logs
2016-06-17 23:08:57 -07:00
use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
2016-06-17 23:08:57 -07:00
our %text;
2009-09-26 10:33:48 -07:00
do 'at-lib.pl';
# parse_webmin_log(user, script, action, type, object, &params, [long])
# Converts logged information from this module into human-readable form
sub parse_webmin_log
{
2016-06-17 23:08:57 -07:00
my ($user, $script, $action, $type, $object, $p, $long) = @_;
2009-09-26 10:33:48 -07:00
if ($type eq "job") {
return &text('log_'.$action.'_job',
"<tt>".&html_escape($object)."</tt>");
}
elsif ($type eq "jobs") {
return &text('log_'.$action.'_jobs', $object);
}
else {
return $text{'log_'.$action};
2009-09-26 10:33:48 -07:00
}
}