[pve-devel] [PATCH guest-common 1/2] vzdump: allow all defined log levels
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Dec 14 07:58:35 CET 2017
Signed-off-by: Thomas Lamprecht <t.lamprecht at 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
More information about the pve-devel
mailing list