How to setup Varnish logging?

前端 未结 5 1909
野性不改
野性不改 2020-12-08 22:47

I want to get Varnish to log requests. I found the command varnishlog -a -w /var/log/varnish.log, but it does not log anything.

Then I found that Varnis

5条回答
  •  执笔经年
    2020-12-08 23:24

    In response to Ketola's answer, you can have varnishncsa log even Cache hit requests, by passing the -c flag. This will allow you to use HTTPD logs to analyse stats.

    Example : varnishncsa -c -a -w ~/varnish.log will write cache hit requests to the file in default NCSA format

提交回复
热议问题