Handle hostnames with upper-case letters
[webmin.git] / zones / log_parser.pl
1 # log_parser.pl
2 # Functions for parsing this module's logs
3
4 do 'zones-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 "net" || $type eq "fs" || $type eq "pkg" ||
12     $type eq "rctl" || $type eq "attr" || $type eq "device") {
13         # Some action on a zone attribute
14         return &text('log_'.$action.'_'.$type,
15                     "<tt>".&html_escape($object)."</tt>",
16                     "<tt>".&html_escape($p->{'keyzone'})."</tt>");
17         }
18 elsif ($type eq "zone") {
19         # Some action on a zone itself
20         return &text('log_'.$action.'_zone',
21                     "<tt>".&html_escape($object)."</tt>");
22         }
23 }
24