[experimental-ims] 745c828 Add two fields to the VSL tag definition, for documentation use.

Poul-Henning Kamp phk at FreeBSD.org
Thu Dec 18 10:27:42 CET 2014


commit 745c8287c4c3c3fa1ab2f93a5cc571a622413c16
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri Mar 23 10:43:47 2012 +0000

    Add two fields to the VSL tag definition, for documentation use.

diff --git a/include/tbl/vsl_tags.h b/include/tbl/vsl_tags.h
index 1321493..a559eed 100644
--- a/include/tbl/vsl_tags.h
+++ b/include/tbl/vsl_tags.h
@@ -34,69 +34,74 @@
  *
  * XXX: Please add new entries a the end to not break saved log-segments.
  * XXX: we can resort them when we have a major release.
+ *
+ * Arguments:
+ *	Tag-Name
+ *	Short Description (1 line, max ?? chars)
+ *	Long Description (Multi line)
  */
 
-SLTM(Debug)
-SLTM(Error)
-SLTM(CLI)
-SLTM(StatSess)
-SLTM(ReqEnd)
-SLTM(SessionOpen)
-SLTM(SessionClose)
-SLTM(BackendOpen)
-SLTM(BackendXID)
-SLTM(BackendReuse)
-SLTM(BackendClose)
-SLTM(HttpGarbage)
-SLTM(Backend)
-SLTM(Length)
+SLTM(Debug, "", "")
+SLTM(Error, "", "")
+SLTM(CLI, "", "")
+SLTM(StatSess, "", "")
+SLTM(ReqEnd, "", "")
+SLTM(SessionOpen, "", "")
+SLTM(SessionClose, "", "")
+SLTM(BackendOpen, "", "")
+SLTM(BackendXID, "", "")
+SLTM(BackendReuse, "", "")
+SLTM(BackendClose, "", "")
+SLTM(HttpGarbage, "", "")
+SLTM(Backend, "", "")
+SLTM(Length, "", "")
 
-SLTM(FetchError)
+SLTM(FetchError, "", "")
 
-#define SLTH(aa, bb)	SLTM(Req##aa)
+#define SLTH(aa, bb)	SLTM(Req##aa, "", "")
 #include "tbl/vsl_tags_http.h"
 #undef SLTH
 
-#define SLTH(aa, bb)	SLTM(Resp##aa)
+#define SLTH(aa, bb)	SLTM(Resp##aa, "", "")
 #include "tbl/vsl_tags_http.h"
 #undef SLTH
 
-#define SLTH(aa, bb)	SLTM(Bereq##aa)
+#define SLTH(aa, bb)	SLTM(Bereq##aa, "", "")
 #include "tbl/vsl_tags_http.h"
 #undef SLTH
 
-#define SLTH(aa, bb)	SLTM(Beresp##aa)
+#define SLTH(aa, bb)	SLTM(Beresp##aa, "", "")
 #include "tbl/vsl_tags_http.h"
 #undef SLTH
 
-#define SLTH(aa, bb)	SLTM(Obj##aa)
+#define SLTH(aa, bb)	SLTM(Obj##aa, "", "")
 #include "tbl/vsl_tags_http.h"
 #undef SLTH
 
-SLTM(LostHeader)
+SLTM(LostHeader, "", "")
 
-SLTM(TTL)
-SLTM(Fetch_Body)
-SLTM(VCL_acl)
-SLTM(VCL_call)
-SLTM(VCL_trace)
-SLTM(VCL_return)
-SLTM(VCL_error)
-SLTM(ReqStart)
-SLTM(Hit)
-SLTM(HitPass)
-SLTM(ExpBan)
-SLTM(ExpKill)
-SLTM(WorkThread)
+SLTM(TTL, "", "")
+SLTM(Fetch_Body, "", "")
+SLTM(VCL_acl, "", "")
+SLTM(VCL_call, "", "")
+SLTM(VCL_trace, "", "")
+SLTM(VCL_return, "", "")
+SLTM(VCL_error, "", "")
+SLTM(ReqStart, "", "")
+SLTM(Hit, "", "")
+SLTM(HitPass, "", "")
+SLTM(ExpBan, "", "")
+SLTM(ExpKill, "", "")
+SLTM(WorkThread, "", "")
 
-SLTM(ESI_xmlerror)
+SLTM(ESI_xmlerror, "", "")
 
-SLTM(Hash)
+SLTM(Hash, "", "")
 
-SLTM(Backend_health)
+SLTM(Backend_health, "", "")
 
-SLTM(VCL_Debug)
-SLTM(VCL_Log)
-SLTM(VCL_Error)
+SLTM(VCL_Debug, "", "")
+SLTM(VCL_Log, "", "")
+SLTM(VCL_Error, "", "")
 
-SLTM(Gzip)
+SLTM(Gzip, "", "")
diff --git a/include/vapi/vsl_int.h b/include/vapi/vsl_int.h
index 8176cce..6f192e9 100644
--- a/include/vapi/vsl_int.h
+++ b/include/vapi/vsl_int.h
@@ -73,7 +73,7 @@
  */
 enum VSL_tag_e {
 	SLT_Bogus = 0,
-#define SLTM(foo)	SLT_##foo,
+#define SLTM(foo,sdesc,ldesc)	SLT_##foo,
 #include "tbl/vsl_tags.h"
 #undef SLTM
 	SLT_Reserved = 255
diff --git a/lib/libvarnishapi/vsl.c b/lib/libvarnishapi/vsl.c
index 8e7001a..cd6034d 100644
--- a/lib/libvarnishapi/vsl.c
+++ b/lib/libvarnishapi/vsl.c
@@ -55,7 +55,7 @@
 /*--------------------------------------------------------------------*/
 
 const char *VSL_tags[256] = {
-#  define SLTM(foo)       [SLT_##foo] = #foo,
+#  define SLTM(foo,sdesc,ldesc)       [SLT_##foo] = #foo,
 #  include "tbl/vsl_tags.h"
 #  undef SLTM
 };



More information about the varnish-commit mailing list