2025-03-14 21:59:59 -06:00
|
|
|
# varnishlog
|
|
|
|
|
|
|
|
|
|
> Display Varnish logs.
|
|
|
|
|
> More information: <https://varnish-cache.org/docs/trunk/reference/varnishlog.html>.
|
|
|
|
|
|
|
|
|
|
- Display logs in real time:
|
|
|
|
|
|
|
|
|
|
`varnishlog`
|
|
|
|
|
|
|
|
|
|
- Only display requests to a specific domain:
|
|
|
|
|
|
|
|
|
|
`varnishlog -q 'ReqHeader eq "Host: {{example.com}}"'`
|
|
|
|
|
|
|
|
|
|
- Only display POST requests:
|
|
|
|
|
|
|
|
|
|
`varnishlog -q 'ReqMethod eq "{{POST}}"'`
|
|
|
|
|
|
|
|
|
|
- Only display requests to a specific path:
|
|
|
|
|
|
|
|
|
|
`varnishlog -q 'ReqURL eq "{{/path}}"'`
|
|
|
|
|
|
2025-09-14 18:48:49 -06:00
|
|
|
- Only display requests to paths matching a `regex`:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
`varnishlog -q 'ReqURL ~ "{{regex}}"'`
|