[pve-devel] [RFC ha-manager 1/3] Env: allow debug logging

Dietmar Maurer dietmar at proxmox.com
Fri Apr 29 08:14:32 CEST 2016


comments inline:

> diff --git a/src/PVE/HA/Env/PVE2.pm b/src/PVE/HA/Env/PVE2.pm
> index 37823ee..03129c8 100644
> --- a/src/PVE/HA/Env/PVE2.pm
> +++ b/src/PVE/HA/Env/PVE2.pm
> @@ -223,6 +223,8 @@ sub log {
>  
>      chomp $msg;
>  
> +    $level = 'warning' if $level eq 'debug';
> +

Why??

>      syslog($level, $msg);
>  }
>  
> diff --git a/src/PVE/HA/Sim/TestEnv.pm b/src/PVE/HA/Sim/TestEnv.pm
> index ceec2a5..93aeede 100644
> --- a/src/PVE/HA/Sim/TestEnv.pm
> +++ b/src/PVE/HA/Sim/TestEnv.pm
> @@ -39,6 +39,8 @@ sub get_time {
>  sub log {
>      my ($self, $level, $msg) = @_;
>  
> +    return if $level eq 'debug';
> +
>      chomp $msg;
>  
>      my $time = $self->get_time();
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 



More information about the pve-devel mailing list