[master] 06a23d7 Don't list unused log record tags in the documentation.

Martin Blix Grydeland martin at varnish-cache.org
Wed Oct 16 16:51:50 CEST 2013


commit 06a23d75a8b5a713fb3f0fb010df0d7f346a7fb5
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Wed Oct 16 16:08:36 2013 +0200

    Don't list unused log record tags in the documentation.
    
    If the short description of a log record contains the string
    "(unused)" it will not be listed in the documentation.

diff --git a/include/tbl/vsl_tags.h b/include/tbl/vsl_tags.h
index eb9b3c0..347e2ec 100644
--- a/include/tbl/vsl_tags.h
+++ b/include/tbl/vsl_tags.h
@@ -192,7 +192,7 @@ SLTM(Hash, "Value added to hash", "")
 
 SLTM(Backend_health, "Backend health check", "")
 
-SLTM(VCL_Debug, "Unused", "")
+SLTM(VCL_Debug, "(unused)", "")
 SLTM(VCL_Log, "Log statement from VCL", "")
 SLTM(VCL_Error, "", "")
 
diff --git a/lib/libvarnishapi/vsl2rst.c b/lib/libvarnishapi/vsl2rst.c
index 26ee3ee..44f1f7c 100644
--- a/lib/libvarnishapi/vsl2rst.c
+++ b/lib/libvarnishapi/vsl2rst.c
@@ -98,6 +98,11 @@ main(int argc, char *argv[])
 	for (i = 0; i < SLT__MAX; i++) {
 		if (ptags[i]->name == NULL || !strcmp(ptags[i]->name, ""))
 			continue;
+		if (ptags[i]->sdesc != NULL &&
+		    strstr(ptags[i]->sdesc, "(unused)"))
+			/* Don't list tags where the short description
+			   contains the string "(unused)" */
+			continue;
 		printf("%s", ptags[i]->name);
 		if (ptags[i]->sdesc != NULL && strcmp(ptags[i]->sdesc, ""))
 			printf(" - %s", ptags[i]->sdesc);



More information about the varnish-commit mailing list