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;
|
2022-06-30 13:08:38 +03:00
|
|
|
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, ¶ms, [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 {
|
2020-10-01 13:25:03 -07:00
|
|
|
return $text{'log_'.$action};
|
2009-09-26 10:33:48 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|