Handle hostnames with upper-case letters
[webmin.git] / status / log_parser.pl
1 # log_parser.pl
2 # Functions for parsing this module's logs
3
4 do 'status-lib.pl';
5
6 # parse_webmin_log(user, script, action, type, object, &params)
7 # Converts logged information from this module into human-readable form
8 sub parse_webmin_log
9 {
10 local ($user, $script, $action, $type, $object, $p) = @_;
11 if ($type eq "template" && $action eq "deletes") {
12         return &text("log_tmpl_deletes", $object);
13         }
14 elsif ($type eq "template") {
15         return &text("log_tmpl_${action}",
16                      "<i>".&html_escape($p->{'desc'})."</i>");
17         }
18 elsif ($action eq "deletes") {
19         return &text("log_deletes", $object);
20         }
21 else {
22         return &text("log_${action}", "<i>".&html_escape($p->{'desc'})."</i>");
23         }
24 }
25