LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

varnishlog

Display Varnish HTTP request logs

TLDR

Show live logs
$ varnishlog
copy
Include only specific 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

Show client-side transactions only.
-b
Show backend-side transactions only.
-q QUERY
VSL query expression to filter transactions.
-i TAGLIST
Include only records with specified tags (comma-separated).
-I TAGREGEX
Include only records matching tag and regex pattern.
-x TAGLIST
Exclude records with specified tags.
-X TAGREGEX
Exclude records matching tag and regex pattern.
-g MODE
Grouping mode (raw, vxid, request, session).
-d
Process old log entries first.
-w FILENAME
Write output to file.

INSTALL

sudo apt install varnish
copy
sudo dnf install varnish
copy
sudo apk add varnish
copy
brew install varnish
copy
nix profile install nixpkgs#varnish
copy

CAVEATS

Requires a running Varnish instance. Familiarity with VSL query language is helpful for effective filtering. Output can be very verbose without filters.

HISTORY

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

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid