Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
30a98d1f
Commit
30a98d1f
authored
May 03, 2016
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes
parent
26cd05dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
23 deletions
+25
-23
varnishncsa.c
bin/varnishncsa/varnishncsa.c
+1
-1
varnishncsa.rst
doc/sphinx/reference/varnishncsa.rst
+24
-22
No files found.
bin/varnishncsa/varnishncsa.c
View file @
30a98d1f
...
@@ -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 specif
y
er must be"
"Syntax error. Field specif
i
er must be"
" positive: %s]"
,
" positive: %s]"
,
buf
);
buf
);
if
(
i
>
INT_MAX
)
{
if
(
i
>
INT_MAX
)
{
...
...
doc/sphinx/reference/varnishncsa.rst
View file @
30a98d1f
...
@@ -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
=======
=======
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment