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 'modify') {
12 if ($p->{'old'} ne $p->{'name'}) {
13 return &text('log_rename', "<tt>$p->{'old'}</tt>",
14 "<tt>$p->{'name'}</tt>");
17 return &text('log_modify', "<tt>$object</tt>");
20 elsif ($action eq 'create') {
21 return &text('log_create', "<tt>$object</tt>");
23 elsif ($action eq 'delete') {
24 return &text('log_delete', "<tt>$object</tt>");
26 elsif ($type eq 'action') {
27 return &text('log_'.$action, "<tt>$object</tt>");
29 elsif ($action eq 'reboot') {
30 return $text{'log_reboot'};
32 elsif ($action eq 'shutdown') {
33 return $text{'log_shutdown'};
35 elsif ($action eq 'local') {
36 return $text{'log_local'};
38 elsif ($action eq 'bootup') {
39 return &text('log_bootup', join(", ", map { "<tt>$_</tt>" } keys %$p));
41 elsif ($action eq 'massstart' || $action eq 'massstop' ||
42 $action eq 'massrestart' ||
43 $action eq 'massenable' || $action eq 'massdisable') {
44 return &text('log_'.$action, join(", ", map { "<tt>$_</tt>" } split(/\s+/, $object)));
46 elsif ($action eq 'telinit') {
47 return &text('log_telinit', $object);