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 'host') {
12 return &text("log_${action}_host", "<tt>$object</tt>");
14 elsif ($type eq 'ipnode') {
15 return &text("log_${action}_ipnode", "<tt>$object</tt>");
17 elsif ($type eq 'hosts' || $type eq 'ipnodes' ||
18 $type eq 'aifcs' || $type eq 'bifcs') {
19 return &text("log_${action}_${type}", $object);
21 elsif ($action eq 'dns') {
22 return $text{'log_dns'};
24 elsif ($action eq 'routes') {
25 return $text{'log_routes'};
27 elsif ($type eq 'aifc' || $type eq 'bifc') {
28 return &text("log_${action}_${type}", "<tt>$object</tt>",
29 $p->{'dhcp'} || $p->{'bootp'} ? $text{'log_dyn'} :
30 "<tt>$p->{'address'}</tt>");
32 elsif ($type eq 'route' && $action eq 'create') {
34 return &text('log_create_route',
35 "<tt>".&html_escape($object)."</tt>");
38 return &text('log_create_defroute');
41 elsif ($type eq 'routes' && $action eq 'delete') {
42 return &text('log_delete_routes', $object);