Handle hostnames with upper-case letters
[webmin.git] / syslog / log_parser.pl
1 # log_parser.pl
2 # Functions for parsing this module's logs
3
4 do 'syslog-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 $object = &html_escape($object);
12 if ($action eq 'modify') {
13         return &text('log_modify', "<tt>$object</tt>");
14         }
15 elsif ($action eq 'create') {
16         return &text('log_create', "<tt>$object</tt>");
17         }
18 elsif ($action eq 'delete') {
19         return &text('log_delete', "<tt>$object</tt>");
20         }
21 elsif ($action eq 'apply') {
22         return $text{'log_apply'};
23         }
24 elsif ($action eq 'start') {
25         return $text{'log_start'};
26         }
27 else {
28         return undef;
29         }
30 }
31