2 # Functions for parsing this module's logs
6 # parse_webmin_log(user, script, action, type, object, ¶ms)
7 # Converts logged information from this module into human-readable form
10 local ($user, $script, $action, $type, $object, $p, $long) = @_;
11 if ($type eq 'poll') {
13 return &text("log_${action}_poll_user",
14 "<tt>".&html_escape($object)."</tt>",
15 "<tt>".&html_escape($p->{'user'})."</tt>");
18 return &text("log_${action}_poll_file",
19 "<tt>".&html_escape($object)."</tt>",
20 "<tt>".&html_escape($p->{'file'})."</tt>");
23 elsif ($type eq 'cron') {
24 return $text{"log_${action}_cron"};
26 elsif ($action eq 'check') {
27 if ($object =~ /^\//) {
28 return &text("log_check_file_${type}",
29 "<tt>".&html_escape($object)."</tt>",
30 "<tt>".&html_escape($p->{'poll'})."</tt>");
33 return &text("log_check_user_${type}",
34 "<tt>".&html_escape($object)."</tt>",
35 "<tt>".&html_escape($p->{'poll'})."</tt>");
38 elsif ($action eq 'global') {
39 return &text($object =~ /^\// ? "log_global_file" : "log_global_user",
40 "<tt>".&html_escape($object)."</tt>");
42 elsif ($action eq 'start') {
43 return &text('log_start', $p->{'interval'});
45 elsif ($action eq 'stop') {
46 return $text{'log_stop'};