Fix logging

This commit is contained in:
Thorsten Spille 2023-02-19 17:30:06 +01:00
parent 68ac6b7bca
commit d3f5709b72

View File

@ -57,7 +57,7 @@ done
shift $((OPTIND-1)) shift $((OPTIND-1))
function log() { function log() {
echo "$(date +'%b %d %T') $1" echo -e "$(date +'%b %d %T') $1"
} }
# load config file # load config file
@ -82,10 +82,10 @@ if [[ $source == "" ]]; then
log "source is empty, switching to local mode." log "source is empty, switching to local mode."
ssh= ssh=
sshport= sshport=
log -e "Configuration:\n\ttarget=$target\n\ttag=$tag\n\tsubvol_source=$subvol_source\n\tsnapshot_filter=$snapshot_filter\n" log "Configuration:\n\ttarget=$target\n\ttag=$tag\n\tsubvol_source=$subvol_source\n\tsnapshot_filter=$snapshot_filter\n"
else else
sshport=-p$sshport sshport=-p$sshport
log -e "Configuration:\n\ttarget=$target\n\tsource=$source\n\tsshport=$sshport\n\ttag=$tag\n\tsubvol_source=$subvol_source\n\tsnapshot_filter=$snapshot_filter\n" log "Configuration:\n\ttarget=$target\n\tsource=$source\n\tsshport=$sshport\n\ttag=$tag\n\tsubvol_source=$subvol_source\n\tsnapshot_filter=$snapshot_filter\n"
fi fi
# query source datasets/subvols to replicate # query source datasets/subvols to replicate