Commit 2ee93510 authored by Tollef Fog Heen's avatar Tollef Fog Heen

Add support for the %{format}t construct to varnishncsa

parent cf192202
...@@ -749,6 +749,11 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd, ...@@ -749,6 +749,11 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
VSB_cat(os, h ? h : "-"); VSB_cat(os, h ? h : "-");
p = tmp; p = tmp;
break; break;
case 't':
strftime(tbuf, sizeof tbuf, fname, &lp->df_t);
VSB_cat(os, tbuf);
p = tmp;
break;
case 'x': case 'x':
if (strcmp(fname, "Varnish:time_firstbyte") == 0) { if (strcmp(fname, "Varnish:time_firstbyte") == 0) {
VSB_cat(os, lp->df_ttfb); VSB_cat(os, lp->df_ttfb);
......
...@@ -90,6 +90,11 @@ The following options are available: ...@@ -90,6 +90,11 @@ The following options are available:
Time when the request was received, in HTTP date/time Time when the request was received, in HTTP date/time
format. format.
%{X}t
Time when the request was received, in the format
specified by X. The time specification format is the
same as for strftime(3).
%U %U
The request URL without any query string. Defaults to The request URL without any query string. Defaults to
'-' if not known. '-' if not known.
......
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