btrbk: tidy logging

pull/427/head
Axel Burri 2021-08-28 12:55:34 +02:00
parent 5dc2375a75
commit 3f84345bed
1 changed files with 2 additions and 2 deletions

4
btrbk
View File

@ -3756,14 +3756,14 @@ sub get_best_parent($$$;@)
my @parent; my @parent;
my @isk = map { $_ eq "defaults" ? @incremental_prefs_default : $_ } @{config_key($svol, "incremental_prefs")}; my @isk = map { $_ eq "defaults" ? @incremental_prefs_default : $_ } @{config_key($svol, "incremental_prefs")};
foreach(@isk) { foreach(@isk) {
DEBUG "processing incremental_prefs: $_"; TRACE "processing incremental_prefs: $_";
my ($k, $n) = split /:/; my ($k, $n) = split /:/;
my $c_list = $c_map{$k} // next; my $c_list = $c_map{$k} // next;
for(1 .. ($n // @$c_list)) { for(1 .. ($n // @$c_list)) {
my $cc = shift @$c_list // last; my $cc = shift @$c_list // last;
next if(grep { $_->[0]{node}{id} == $cc->[0]{node}{id} } @parent); next if(grep { $_->[0]{node}{id} == $cc->[0]{node}{id} } @parent);
DEBUG "Resolved " . (@parent ? "clone source" : "parent") . " (" . DEBUG "Resolved " . (@parent ? "clone source" : "parent") . " (" .
"next closest " . ($k =~ /n/ ? " newer" : "older") . "next closest " . ($k =~ /n/ ? "newer" : "older") .
" by " . ($k =~ /s/ ? "btrbk timestamp in snapdir" : "cgen") . " by " . ($k =~ /s/ ? "btrbk timestamp in snapdir" : "cgen") .
", " . ($k =~ /r/ ? "with" : "regardless of") . " parent_uuid relationship" . ", " . ($k =~ /r/ ? "with" : "regardless of") . " parent_uuid relationship" .
"): $cc->[0]{PRINT}" if($loglevel >= 3); "): $cc->[0]{PRINT}" if($loglevel >= 3);