Commit 30a98d1f authored by Federico G. Schwindt's avatar Federico G. Schwindt

Minor fixes

parent 26cd05dd
...@@ -646,7 +646,7 @@ parse_x_format(char *buf) ...@@ -646,7 +646,7 @@ parse_x_format(char *buf)
VUT_Error(1, "Syntax error: VSL:%s]", buf); VUT_Error(1, "Syntax error: VSL:%s]", buf);
if (i <= 0) if (i <= 0)
VUT_Error(1, VUT_Error(1,
"Syntax error. Field specifyer must be" "Syntax error. Field specifier must be"
" positive: %s]", " positive: %s]",
buf); buf);
if (i > INT_MAX) { if (i > INT_MAX) {
......
...@@ -54,8 +54,7 @@ Client requests that results in a pipe (ie. return(pipe) in vcl), will ...@@ -54,8 +54,7 @@ Client requests that results in a pipe (ie. return(pipe) in vcl), will
not generate logging in backend mode. This is because varnish is not not generate logging in backend mode. This is because varnish is not
generating requests, but blindly passes on bytes in both directions. generating requests, but blindly passes on bytes in both directions.
However, a varnishncsa instance running in normal mode can see this However, a varnishncsa instance running in normal mode can see this
case by using the formatter %{Varnish:handling}x, which will be "pipe" case by using the formatter %{Varnish:handling}x, which will be 'pipe'.
(without the quotes).
In backend mode, some of the fields in the format string get different In backend mode, some of the fields in the format string get different
meanings. Most notably, the byte counting formatters (%b, %I, %O) meanings. Most notably, the byte counting formatters (%b, %I, %O)
...@@ -67,10 +66,8 @@ backend mode, and one in client mode, logging to different files. ...@@ -67,10 +66,8 @@ backend mode, and one in client mode, logging to different files.
FORMAT FORMAT
====== ======
Specify the log format used. If no format is specified the default log Specify the log format to use. If no format is specified the default log
format is used. format is used::
The default log format is::
%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i" %h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i"
...@@ -104,10 +101,10 @@ Supported formatters are: ...@@ -104,10 +101,10 @@ Supported formatters are:
The contents of request header X. The contents of request header X.
%l %l
Remote logname (always '-') Remote logname. Always '-'.
%m %m
Request method. Defaults to '-' if not known. Request method. Defaults to '-' if not known.
%{X}o %{X}o
The contents of response header X. The contents of response header X.
...@@ -117,7 +114,7 @@ Supported formatters are: ...@@ -117,7 +114,7 @@ Supported formatters are:
bytes received from the backend. bytes received from the backend.
%q %q
The query string, if no query string exists, an empty string. The query string. Defaults to an empty string if not present.
%r %r
The first line of the request. Synthesized from other fields, so it The first line of the request. Synthesized from other fields, so it
...@@ -132,7 +129,6 @@ Supported formatters are: ...@@ -132,7 +129,6 @@ Supported formatters are:
date/time format. In backend mode, time when the request was sent. date/time format. In backend mode, time when the request was sent.
%{X}t %{X}t
In client mode, time when the request was received, in the format In client mode, time when the request was received, in the format
specified by X. In backend mode, time when the request was sent. specified by X. In backend mode, time when the request was sent.
The time specification format is the same as for strftime(3). The time specification format is the same as for strftime(3).
...@@ -143,11 +139,11 @@ Supported formatters are: ...@@ -143,11 +139,11 @@ Supported formatters are:
been received. been received.
%U %U
The request URL without any query string. Defaults to '-' if not The request URL without the query string. Defaults to '-' if not
known. known.
%u %u
Remote user from auth Remote user from auth.
%{X}x %{X}x
Extended variables. Supported variables are: Extended variables. Supported variables are:
...@@ -166,9 +162,9 @@ Supported formatters are: ...@@ -166,9 +162,9 @@ Supported formatters are:
pass, pipe or synth. pass, pipe or synth.
Varnish:side Varnish:side
Backend or client side. One of two values, "b" or "c" (without the Backend or client side. One of two values, 'b' or 'c', depending
quotes), depending on where the request was made. In pure backend on where the request was made. In pure backend or client mode,
or client mode, this field will be constant. this field will be constant.
Varnish:vxid Varnish:vxid
The VXID of the varnish transaction. The VXID of the varnish transaction.
...@@ -177,13 +173,10 @@ Supported formatters are: ...@@ -177,13 +173,10 @@ Supported formatters are:
Output value set by std.log("key:value") in VCL. Output value set by std.log("key:value") in VCL.
VSL:tag or VSL:tag[field] VSL:tag or VSL:tag[field]
The value of the varnishlog entry with the given tag. If field is The value of the VSL entry for the given tag. If field is specified,
specified, only the selected part is shown. Defaults to "-" only the selected part is shown. Defaults to '-' when the tag is not
(without the quotes) when the key is not seen, or when the field seen, or when the field is out of bounds. If a tag appears several
is out of bounds. If a key appears several times in a single times in a single transaction, only the first occurrence is used.
transaction, only the first occurrence is used. Example: The
formatter %{VSL:Begin[2]}x will print the second field of the
Begin tag, which is the VXID of the parent transaction.
SIGNALS SIGNALS
======= =======
...@@ -194,12 +187,21 @@ SIGHUP ...@@ -194,12 +187,21 @@ SIGHUP
SIGUSR1 SIGUSR1
Flush any outstanding transactions Flush any outstanding transactions
EXAMPLE
=======
Log the second field of the Begin tag, corresponding to the VXID of the
parent transaction::
varnishncsa -F "%{VSL:Begin[2]}x"
SEE ALSO SEE ALSO
======== ========
:ref:`varnishd(1)` :ref:`varnishd(1)`
:ref:`varnishlog(1)` :ref:`varnishlog(1)`
:ref:`varnishstat(1)` :ref:`varnishstat(1)`
:ref:`vsl(7)`
HISTORY HISTORY
======= =======
......
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