[experimental-ims] cf4da22 Reimplement param log_hashstring using vsl_mask
Poul-Henning Kamp
phk at FreeBSD.org
Thu Dec 18 10:27:54 CET 2014
commit cf4da2286ef0f3321c5e0c12b7a4bee50eacc83c
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Aug 27 10:46:45 2012 +0000
Reimplement param log_hashstring using vsl_mask
XXX: doc-update needed
diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
index 0db0d6b..5e1b004 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -169,8 +169,7 @@ HSH_AddString(struct req *req, const char *str)
SHA256_Update(req->sha256ctx, str, l);
SHA256_Update(req->sha256ctx, "#", 1);
- if (cache_param->log_hash)
- VSLb(req->vsl, SLT_Hash, "%s", str);
+ VSLb(req->vsl, SLT_Hash, "%s", str);
}
/*---------------------------------------------------------------------
diff --git a/bin/varnishd/common/params.h b/bin/varnishd/common/params.h
index 79de607..e2c9ec1 100644
--- a/bin/varnishd/common/params.h
+++ b/bin/varnishd/common/params.h
@@ -144,9 +144,6 @@ struct params {
/* Control diagnostic code */
unsigned diag_bitmap;
- /* Log hash string to shm */
- unsigned log_hash;
-
/* Log local socket address to shm */
unsigned log_local_addr;
diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c
index 026207c..9ce9470 100644
--- a/bin/varnishd/mgt/mgt_param.c
+++ b/bin/varnishd/mgt/mgt_param.c
@@ -1033,10 +1033,6 @@ static const struct parspec input_parspec[] = {
"more sessions take a detour around the waiter.",
EXPERIMENTAL,
"0.050", "seconds" },
- { "log_hashstring", tweak_bool, &mgt_param.log_hash, 0, 0,
- "Log the hash string components to shared memory log.\n",
- 0,
- "on", "bool" },
{ "log_local_address", tweak_bool, &mgt_param.log_local_addr, 0, 0,
"Log the local address on the TCP connection in the "
"SessionOpen VSL record.\n"
diff --git a/bin/varnishd/mgt/mgt_param_vsl.c b/bin/varnishd/mgt/mgt_param_vsl.c
index 6338d49..28ba7de 100644
--- a/bin/varnishd/mgt/mgt_param_vsl.c
+++ b/bin/varnishd/mgt/mgt_param_vsl.c
@@ -82,6 +82,7 @@ tweak_vsl_mask(struct cli *cli, const struct parspec *par, const char *arg)
if (!strcmp(arg, "default")) {
(void)vsl_bit(SLT_VCL_trace, BSET);
(void)vsl_bit(SLT_WorkThread, BSET);
+ (void)vsl_bit(SLT_Hash, BSET);
} else if (*arg != 0) {
av = VAV_Parse(arg, &n, ARGV_COMMA);
if (av[0] != NULL) {
@@ -118,7 +119,7 @@ tweak_vsl_mask(struct cli *cli, const struct parspec *par, const char *arg)
}
} else {
s = "";
- for (j = 0; j < 256; j++) {
+ for (j = 0; j < (unsigned)SLT_Reserved; j++) {
if (vsl_bit(j, BTST)) {
VCLI_Out(cli, "%s-%s", s, VSL_tags[j]);
s = ",";
More information about the varnish-commit
mailing list