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

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Apr 29 10:57:28 CEST 2016



On 04/29/2016 08:14 AM, Dietmar Maurer wrote:
> 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??

This level was thought for debugging while programming, not for debug
messages per sè and I wanted to add visual contrast when working with
journalctl.

But yeah it's probably better to let them on the debug level, if we add
"real" debug logs for the user this is better.

>
>>      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