LinuxCommandLibrary

varnishlog

Display Varnish HTTP request logs

TLDR

Show live logs

$ varnishlog
copy
Filter by tag
$ varnishlog -I [ReqURL]
copy
Filter by query
$ varnishlog -q "[RespStatus == 500]"
copy
Client requests only
$ varnishlog -c
copy
Backend requests only
$ varnishlog -b
copy
Group by request
$ varnishlog -g request
copy

SYNOPSIS

varnishlog [-c] [-b] [-q query] [-I tag] [options]

DESCRIPTION

varnishlog reads the Varnish Shared Memory Log (VSL) and displays detailed request and response information in real time. It shows the full lifecycle of HTTP transactions including client requests, backend fetches, cache decisions, and response headers.
The tool provides powerful filtering through the VSL query language, allowing you to isolate specific transactions by status code, URL pattern, or any logged field. Client-side (-c) and backend-side (-b) views can be shown independently, and grouping modes organize output by request, session, or raw log entries. This makes it the primary debugging tool for understanding Varnish cache behavior.

PARAMETERS

-c

Client side.
-b
Backend side.
-q QUERY
VSL query.
-I TAG
Include tag.
-g MODE
Grouping mode.
-d
Process old entries.

CAVEATS

Varnish specific. VSL knowledge helpful. Running Varnish needed.

HISTORY

varnishlog is part of Varnish Cache, displaying the Varnish Shared Memory Log for debugging.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community