Skip to content

Commit

Permalink
Merge pull request #1205 from aspiers/always-log
Browse files Browse the repository at this point in the history
always log output to a file
  • Loading branch information
dirkmueller authored Sep 7, 2016
2 parents 60051e4 + 2a4f415 commit 6122738
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/mkcloud
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
# 2. This tool relies on the script qa_crowbarsetup.sh
# 3. Please 'export' environment variables according to your needs.

: ${cloud:=cloud}
: ${log_dir:=/var/log/mkcloud/$cloud}
mkdir -p "$log_dir"
log_file=$log_dir/`date -Iseconds`.log
exec > >(tee -ia $log_file)
exec 2> >(tee -ia $log_file >&2)

if [[ $debug_mkcloud = 1 ]] ; then
set -x
Expand Down Expand Up @@ -72,7 +78,6 @@ cpuflags=''
working_dir_orig=`pwd`
: ${artifacts_dir:=$working_dir_orig/.artifacts}
start_time=`date`
: ${cloud:=cloud}
: ${cloudvg:=cloud}
needcvol=1
: ${vdisk_dir:=/dev/$cloudvg}
Expand Down

0 comments on commit 6122738

Please sign in to comment.