Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com>
---
 PVE/VZDump/Plugin.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/PVE/VZDump/Plugin.pm b/PVE/VZDump/Plugin.pm
index 772b619..9e8a76f 100644
--- a/PVE/VZDump/Plugin.pm
+++ b/PVE/VZDump/Plugin.pm
@@ -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";
-- 
2.11.0


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to