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,
VSB_cat(os, h ? h : "-");
p = tmp;
break;
case 't':
strftime(tbuf, sizeof tbuf, fname, &lp->df_t);
VSB_cat(os, tbuf);
p = tmp;
break;
case 'x':
if (strcmp(fname, "Varnish:time_firstbyte") == 0) {
VSB_cat(os, lp->df_ttfb);
......
......@@ -90,6 +90,11 @@ The following options are available:
Time when the request was received, in HTTP date/time
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
The request URL without any query string. Defaults to
'-' 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