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, $long) = @_;
11 if ($action eq "delsel") {
12 return &text($type eq "nat" ? 'log_delselnat'
13 : 'log_delsel', $p->{'count'});
15 elsif ($type eq "rule") {
16 return &text("log_${action}_rule".($long ? "_l" : ""),
17 $text{'action_'.$p->{'action'}},
18 &describe_rule($p, 1));
20 elsif ($type eq "nat") {
21 return &text("log_${action}_nat".($long ? "_l" : ""),
22 $text{'action_'.$p->{'action'}},
23 &describe_from($p, 1),
26 elsif ($type eq "host" || $type eq "group") {
27 return &text("log_${action}_${type}", "<tt>$object</tt>");
30 return $text{"log_$action"};