aboutsummaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-07-25 20:07:26 +0000
committerOmar Polo <op@omarpolo.com>2023-07-25 20:07:26 +0000
commitabd261d25bdfa01c44d07a9803db669bc62ddf76 (patch)
treeb7138101f8d0cb2b2fe64eea13c35f3b1a0a3a1b /regress
parent2a28b0442431d06f1989c9c4861c442bca5c7dcf (diff)
allow to change the logging style; introduce some new ones
add `log style <style>'; The old default is called `legacy' now, a new default format is added called `condensed', and `common' and `combined' to mimick Apache httpd and nginx (respectively) are also added.
Diffstat (limited to 'regress')
-rw-r--r--regress/tests.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/regress/tests.sh b/regress/tests.sh
index 9020103..4fc9b59 100644
--- a/regress/tests.sh
+++ b/regress/tests.sh
@@ -385,10 +385,11 @@ test_log_file() {
fetch_hdr /
check_reply '20 text/gemini'
- # remove the <ip>:<port> leading part
- awk '{$1 = ""; print substr($0, 2)}' log > log.edited
+ # remove the date and ip
+ awk '{$1 = ""; $2 = ""; print substr($0, 3)}' log > log.edited
- echo GET gemini://localhost/ 20 text/gemini | cmp -s - log.edited
+ printf '%s\n' '- localhost gemini://localhost/ 0 20 text/gemini' \
+ | cmp -s - log.edited
if [ $? -ne 0 ]; then
# keep the log for post-mortem analysis
return 1