2 # Functions for parsing this module's logs
6 # parse_webmin_log(user, script, action, type, object, ¶ms)
7 # Converts logged information from this module into human-readable form
10 local ($user, $script, $action, $type, $object, $p) = @_;
11 if ($action eq 'apply') {
12 return $text{'log_apply'};
14 elsif ($action eq 'start') {
15 return $text{'log_start'};
17 elsif ($action eq 'stop') {
18 return $text{'log_stop'};
20 elsif ($type eq 'subnet' || $type eq 'shared' || $type eq 'host') {
21 return &text("log_${action}_${type}",
22 "<tt>".&html_escape($object)."</tt>");
24 elsif ($type eq 'group') {
25 local @h = split(/,/, $object);
26 return &text("log_${action}_group", scalar(@h));
28 elsif ($type eq 'subnets' || $type eq 'hosts') {
29 return &text("log_${action}_${type}", $object);
31 elsif ($type eq 'lease' && $action eq 'delete') {
32 return &text('log_delete_lease',
33 "<tt>".&html_escape($object)."</tt>");