Handle hostnames with upper-case letters
[webmin.git] / servers / log_parser.pl
1 # log_parser.pl
2 # Functions for parsing this module's logs
3
4 use strict;
5 use warnings;
6 do 'servers-lib.pl';
7 our (%text);
8
9 # parse_webmin_log(user, script, action, type, object, &params)
10 # Converts logged information from this module into human-readable form
11 sub parse_webmin_log
12 {
13 my ($user, $script, $action, $type, $object, $p) = @_;
14 $object = &html_escape($object);
15 if ($action eq 'modify') {
16         return &text('log_modify', "<tt>$object</tt>");
17         }
18 elsif ($action eq 'create') {
19         return &text('log_create', "<tt>$object</tt>");
20         }
21 elsif ($action eq 'find') {
22         return &text('log_find', "<tt>$object</tt>");
23         }
24 elsif ($action eq 'delete') {
25         return &text('log_delete', "<tt>$object</tt>");
26         }
27 elsif ($action eq 'deletes') {
28         return &text('log_deletes', $object);
29         }
30 else {
31         return undef;
32         }
33 }
34