Write logs to STDERR on remote side

This commit is contained in:
Andrey M. Smirnov 2016-07-28 00:08:40 +00:00
parent 7bb6eebea3
commit 9129020daf
1 changed files with 2 additions and 1 deletions

View File

@ -2083,7 +2083,8 @@ local DELETE_CMD_INPUT=$(cat << 'ENDSSH'
## The following lines are executed remotely ## The following lines are executed remotely
function _logger { function _logger {
local value="${1}" # What to log local value="${1}" # What to log
echo -e "$value" >> "$LOG_FILE" #echo -e "$value" >> "$LOG_FILE"
echo -e "$value" >&2 # writing to STDERR because
if [ $_SILENT -eq 0 ]; then if [ $_SILENT -eq 0 ]; then
echo -e "$value" echo -e "$value"