From 6d975d283073e90247214961e31d49959e7765c6 Mon Sep 17 00:00:00 2001 From: David Steele Date: Fri, 21 Feb 2014 08:49:27 -0500 Subject: [PATCH] No longer discarding stderr --- pg_backrest_file.pm | 2 +- pg_backrest_utility.pm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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}) {