Handle hostnames with upper-case letters
[webmin.git] / ppp-client / log_parser.pl
1 # log_parser.pl
2 # Functions for parsing this module's logs
3
4 do 'ppp-client-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 "dialer") {
12         return &text('log_'.$action,
13                      "<tt>".&html_escape(&dialer_name($object))."</tt>");
14         }
15 elsif ($action eq "init") {
16         return $text{'log_init'};
17         }
18 elsif ($action eq "connect") {
19         return &text($object && $object ne '-' ? 'log_connect' : 'log_fail',
20                      "<tt>".&html_escape($type)."</tt>");
21         }
22 elsif ($action eq "disconnect") {
23         return &text('log_disconnect', "<tt>".&html_escape($type)."</tt>");
24         }
25 else {
26         return undef;
27         }
28 }
29