[master] 9853a629d varnishlog: Document impotent options without -w

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Nov 29 16:12:07 UTC 2021


commit 9853a629d512e9a4f513c8286787acb908db63e7
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Nov 23 09:47:59 2021 +0100

    varnishlog: Document impotent options without -w

diff --git a/bin/varnishlog/varnishlog_options.h b/bin/varnishlog/varnishlog_options.h
index 39d07b913..dabaffff0 100644
--- a/bin/varnishlog/varnishlog_options.h
+++ b/bin/varnishlog/varnishlog_options.h
@@ -32,22 +32,24 @@
 #include "vapi/vapi_options.h"
 #include "vut_options.h"
 
+#define LOG_NOTICE_w " This option has no effect without the -w option."
+
 #define LOG_OPT_a							\
 	VOPT("a", "[-a]", "Append to file",				\
 	    "When writing output to a file with the -w option, append"	\
-	    " to it rather than overwrite it."				\
+	    " to it rather than overwrite it." LOG_NOTICE_w		\
 	)
 
 #define LOG_OPT_A							\
 	VOPT("A", "[-A]", "Text output",				\
 	    "When writing output to a file with the -w option, output"	\
-	    " data in ascii format."					\
+	    " data in ascii format." LOG_NOTICE_w			\
 	)
 
 #define LOG_OPT_u							\
 	VOPT("u", "[-u]", "Unbuffered output",				\
 	    "When writing output to a file with the -w option, output"	\
-	    " data is not buffered."					\
+	    " data is not buffered." LOG_NOTICE_w			\
 	)
 
 #define LOG_OPT_w							\
diff --git a/bin/varnishtest/tests/u00006.vtc b/bin/varnishtest/tests/u00006.vtc
index 6fe729929..7c4fcf706 100644
--- a/bin/varnishtest/tests/u00006.vtc
+++ b/bin/varnishtest/tests/u00006.vtc
@@ -9,7 +9,7 @@ varnish v1 -vcl+backend {} -start
 
 # We use this to make sure we know there is a "0 CLI" in the binary log.
 process p1 {
-	exec varnishlog -n ${v1_name} -g raw -u -A
+	exec varnishlog -n ${v1_name} -g raw -u -A -w -
 } -start
 
 shell {


More information about the varnish-commit mailing list