From 9e4514e829db2f8921be289ecf3e97713456408c Mon Sep 17 00:00:00 2001 From: Jay Caines-Gooby Date: Mon, 4 Jul 2022 18:57:29 +0100 Subject: [PATCH] Fix the failing tests for logging --- ttfb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ttfb b/ttfb index 06c74b1..41fb362 100755 --- a/ttfb +++ b/ttfb @@ -156,6 +156,14 @@ fi for URL in $URLS; do + if [ $DEBUG -eq 1 ]; then + if [ ${#@} -gt 1 ]; then + LOGFILE="${URL//[^[:alnum:]]/_}" + options+=(-D "${LOG_DIRECTORY}/${LOGFILE}-${LOG}") + else + options+=(-D "${LOG_DIRECTORY}/${LOG}") + fi + fi # if we're checking more than one url # output the url on the results line if [ ${#@} -gt 1 ]; then