Commit 7f9e626a authored by Geoff Simmons's avatar Geoff Simmons

varnishevent formats %q

parent 2a48ae9d
......@@ -83,7 +83,8 @@ static unsigned wrt_nfree;
output string can just be formatted with VSB_vprintf(), and the
reader can be limited to only read the needed tags. */
static const char *cformat;
static const char *bformat = "%t url=[%U] rc=[%s] len=[%b] xid=[%{X-Varnish}i]";
static const char *bformat
= "%t dir=%d url=[%U] qs=[%q] rc=[%s] len=[%b] xid=[%{X-Varnish}i]";
static struct vsb *os;
......@@ -240,15 +241,17 @@ wrt_write_client(logline_t *ll)
VSB_REC_CAT(os, ll->tag[SLT_RxRequest]);
break;
#if 0
case 'q':
case 'q': {
char *qs = NULL;
qs = memchr(ll->tag[SLT_RxURL].data, '?', ll->tag[SLT_RxURL].len);
if (qs != NULL)
VSB_cat(os, qs);
VSB_bcat(os, qs + 1,
ll->tag[SLT_RxURL].len - (qs - ll->tag[SLT_RxURL].data) - 1);
break;
}
#if 0
case 'r':
/*
* Fake "%r". This would be a lot easier if Varnish
......@@ -470,15 +473,17 @@ wrt_write_backend(logline_t *ll)
VSB_REC_CAT(os, ll->tag[SLT_TxRequest]);
break;
#if 0
case 'q':
case 'q': {
char *qs = NULL;
qs = strchr(ll->tag[SLT_TxURL], '?');
qs = memchr(ll->tag[SLT_TxURL].data, '?', ll->tag[SLT_TxURL].len);
if (qs != NULL)
VSB_cat(os, qs);
VSB_bcat(os, qs + 1,
ll->tag[SLT_TxURL].len - (qs - ll->tag[SLT_TxURL].data) - 1);
break;
}
#if 0
case 'r':
/*
* Fake "%r". This would be a lot easier if Varnish
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment