Just create the variables at the beginning of your script and use them later in your mkdir as following:
LOGPATH=/path/to/somedir....mkdir -p ${LOGPATH} ....