log_start ()
{
	local logfile="$1"

	if touch "$logfile"
	then
		unset SPACEEMAN_NOLOG
		exec 8>&1 # save 1 in 8
		exec 9>&2 # save 2 in 9
		exec &>"$logfile" # and set 1 to logfile
	else
		echo "\"$logfile\" can not be write"
		SPACEEMAN_NOLOG=set
	fi
}

log_stop ()
{
	if [ ! $SPACEEMAN_NOLOG ]
	then
		exec 1>&8
		exec 2>&9
	fi
}

