2 # Functions for parsing this module's logs
6 # parse_webmin_log(user, script, action, type, object, ¶ms, [long])
7 # Converts logged information from this module into human-readable form
10 local ($user, $script, $action, $type, $object, $p, $long) = @_;
12 return &text('log_env_'.$action, "<tt>$object</tt>");
14 elsif ($type eq "crons") {
15 return &text('log_crons_'.$action, $object);
17 elsif ($action eq "move") {
18 return &text('log_move', "<tt>$object</tt>");
20 elsif ($action eq 'modify') {
21 return &text($long ? 'log_modify_l' : 'log_modify',
23 "<tt>".&html_escape($p->{'cmd'})."</tt>");
25 elsif ($action eq 'create') {
26 return &text($long ? 'log_create_l' : 'log_create',
28 "<tt>".&html_escape($p->{'cmd'})."</tt>");
30 elsif ($action eq 'delete') {
31 return &text($long ? 'log_delete_l' : 'log_delete',
33 "<tt>".&html_escape($p->{'command'})."</tt>");
35 elsif ($action eq 'exec' || $action eq 'kill') {
36 return &text($long ? 'log_'.$action.'_l' : 'log_'.$action,
38 "<tt>".&html_escape($p->{'command'})."</tt>");
40 elsif ($action eq 'allow') {
41 return $text{'log_allow'};