Merge "Make rejoin-stack.sh resume file logging if enabled"
diff --git a/functions b/functions
index 995be57..7e08190 100644
--- a/functions
+++ b/functions
@@ -1159,6 +1159,11 @@
         NL=`echo -ne '\015'`
         echo "screen -t $1 bash" >> $SCREENRC
         echo "stuff \"$2$NL\"" >> $SCREENRC
+
+        if [[ -n ${SCREEN_LOGDIR} ]]; then
+            echo "logfile ${SCREEN_LOGDIR}/screen-${1}.${CURRENT_LOG_TIME}.log" >>$SCREENRC
+            echo "log on" >>$SCREENRC
+        fi
     fi
 }