9
:Author: Dag-Erling Smørgrav
19
varnishlog [-a] [-b] [-C] [-c] [-D] [-d] [-I regex] [-i tag] [-k keep]
20
[-n varnish_name] [-o] [-P file] [-r file] [-s num] [-u] [-V]
21
[-w file] [-X regex] [-x tag] [tag regex]
27
The varnishlog utility reads and presents varnishd(1) shared memory logs.
29
The following options are available:
31
-a When writing to a file, append to it rather than overwrite it.
33
-b Include log entries which result from communication with a backend server.
34
If neither -b nor -c is specified, varnishlog acts as if they both were.
36
-C Ignore case when matching regular expressions.
38
-c Include log entries which result from communication with a client.
39
If neither -b nor -c is specified, varnishlog acts as if they both were.
43
-d Process old log entries on startup. Normally, varnishlog will only process entries
44
which are written to the log after it starts.
46
-I regex Include log entries which match the specified regular expression. If
47
neither -I nor -i is specified, all log entries are included.
49
-i tag Include log entries with the specified tag. If neither -I nor -i is specified,
50
all log entries are included.
52
-k num Only show the first num log records.
54
-n Specifies the name of the varnishd instance to get logs from. If -n is not
55
specified, the host name is used.
57
-o Group log entries by request ID. This has no effect when writing to a
58
file using the -w option.
60
-P file Write the process's PID to the specified file.
62
-r file Read log entries from file instead of shared memory.
64
-s num Skip the first num log records.
68
-V Display the version number and exit.
70
-w file Write log entries to file instead of displaying them. The file
71
will be overwritten unless the -a option was specified. If
72
varnishlog receives a SIGHUP while writing to a file, it will
73
reopen the file, allowing the old one to be rotated away.
75
-X regex Exclude log entries which match the specified regular expression.
77
-x tag Exclude log entries with the specified tag.
79
If the -o option was specified, an additional tag and regex may be
80
specified to select only requests which generated a log entry with the
81
given tag whose contents match the given regex.
85
The following log entry tags are currently defined:
141
The following command line simply copies all log entries to a log file:::
143
$ varnishlog -w /var/log/varnish.log
145
The following command line reads that same log file and displays requests for the front page:::
147
$ varnishlog -r /var/log/varnish.log -c -o RxURL '^/$'
160
The varnishlog utility was developed by Poul-Henning Kamp ⟨phk@phk.freebsd.dk⟩ in cooperation with Verdens Gang
161
AS, Linpro AS and Varnish Software. This manual page was initially written by Dag-Erling Smørgrav.
167
This document is licensed under the same licence as Varnish
168
itself. See LICENCE for details.
170
* Copyright (c) 2006 Verdens Gang AS
171
* Copyright (c) 2006-2008 Linpro AS
172
* Copyright (c) 2008-2010 Redpill Linpro AS
173
* Copyright (c) 2010 Varnish Software AS