Handle hostnames with upper-case letters
[webmin.git] / backup-config / log_parser.pl
1 # log_parser.pl
2 # Functions for parsing this module's logs
3
4 use strict;
5 use warnings;
6 do 'backup-config-lib.pl';
7 our (%text);
8
9 # parse_webmin_log(user, script, action, type, object, &params)
10 # Converts logged information from this module into human-readable form
11 sub parse_webmin_log
12 {
13 my ($user, $script, $action, $type, $object, $p) = @_;
14 if ($type eq "backup") {
15         my @mods = split(/\s+/, $p->{'mods'});
16         return &text('log_'.$action.'_backup', scalar(@mods), &nice_dest($object));
17         }
18 elsif ($action eq "backup" || $action eq "restore") {
19         my @mods = split(/\0/, $p->{'mods'});
20         return &text('log_'.$action, scalar(@mods), &nice_dest($object));
21         }
22 else {
23         return undef;
24         }
25 }
26