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 ($type eq 'record') {
12 if ($p->{'type'} eq 'PTR') {
13 return &text("log_${action}_record",$text{"type_$p->{'type'}"},
14 "<tt>".&arpa_to_ip($p->{'name'})."</tt>",
15 "<tt>".&arpa_to_ip($object)."</tt>");
18 $p->{'name'} =~ s/\.$object\.*$//;
19 return &text("log_${action}_record", $text{"type_$p->{'type'}"},
20 "<tt>$p->{'name'}</tt>", "<tt>$object</tt>");
23 elsif ($action eq 'create') {
24 return &text("log_${type}", "<tt>$object</tt>");
26 elsif ($action eq 'delete') {
27 return &text("log_delete_${type}", "<tt>$object</tt>");
29 elsif ($action eq 'text') {
30 return &text("log_text", "<tt>$object</tt>");
32 elsif ($action eq 'soa') {
33 return &text("log_soa", "<tt>$object</tt>");
35 elsif ($action eq 'opts') {
36 return &text("log_opts", "<tt>$object</tt>");
38 elsif ($text{"log_${action}"}) {
39 return $text{"log_${action}"};