]> git.proxmox.com Git - pve-guest-common.git/commitdiff
vzdump: allow all defined log levels
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 14 Dec 2017 06:58:35 +0000 (07:58 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 15 Dec 2017 11:11:22 +0000 (12:11 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/VZDump/Plugin.pm

index 772b619e445a18d3e67fb018fc9ec859001c82be..9e8a76f09e7b8a6d4f38d7a90f5b4b0de3ce78aa 100644 (file)
@@ -21,11 +21,12 @@ sub debugmsg {
 
     return if !$msg;
 
-    my $pre = $log_level->{$mtype} || $log_level->{'err'};
+    my $level = $log_level->{$mtype} ? $mtype : 'err';
+    my $pre = $log_level->{$level};
 
     my $timestr = strftime ("%F %H:%M:%S", CORE::localtime);
 
-    syslog ($mtype eq 'info' ? 'info' : 'err', "$pre $msg") if $syslog;
+    syslog ($level, "$pre $msg") if $syslog;
 
     foreach my $line (split (/\n/, $msg)) {
        print STDERR "$pre $line\n";