mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
30 lines
616 B
Plaintext
30 lines
616 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# varnishlog
|
|
|
|
> Display Varnish logs.
|
|
> More information: <https://vinyl-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}}"'`
|
|
|
|
- Only display requests to paths matching a `regex`:
|
|
|
|
`varnishlog -q 'ReqURL ~ "{{regex}}"'`
|