diff --git a/pg_backrest_file.pm b/pg_backrest_file.pm index a05a8b420..b59ae81c8 100644 --- a/pg_backrest_file.pm +++ b/pg_backrest_file.pm @@ -581,7 +581,7 @@ sub file_copy # Execute the command through ssh my $oSSH = $self->remote_get($strSourcePathType); - unless ($oSSH->system({stdout_fh => $hFile, stderr_discard => true}, $strCommand)) + unless ($oSSH->system({stdout_fh => $hFile}, $strCommand)) { close($hFile) or confess &log(ERROR, "cannot close file ${strDestinationTmp}"); diff --git a/pg_backrest_utility.pm b/pg_backrest_utility.pm index 348375094..430c33708 100644 --- a/pg_backrest_utility.pm +++ b/pg_backrest_utility.pm @@ -318,7 +318,8 @@ sub log } $strMessage = sprintf("%4d-%02d-%02d %02d:%02d:%02d", $year+1900, $mon+1, $mday, $hour, $min, $sec) . - (" " x (7 - length($strLevel))) . "${strLevel} " . threads->tid() . ": ${strMessage}\n"; + (" " x (7 - length($strLevel))) . "${strLevel} " . (" " x (2 - length(threads->tid()))) . + threads->tid() . ": ${strMessage}\n"; if ($oLogLevelRank{"${strLevel}"}{rank} <= $oLogLevelRank{"${strLogLevelConsole}"}{rank}) {