Date: 2011-07-25 10:36:30 00:00

Varnish Logs

Varnish is a powerful reverse proxy that can balance the load of multiple web servers, and cache the required pages at the same time. You can read more about it at its home page

Now we all know that debugging is an important part of installing, configuring and fine tuning any piece of software, and that goes to varnish too, and varnishlog is a great utility to help you while debugging varnish.

varnishlog

As the name says, it display Varnish logs, but if you have a very busy site, and your run it with no parameters you will hardly follow the logs in the screen, so your first option to solve this, is to write the logs to a file and analyze them later.

varnishlog -w /home/user/varnishlogs.log

You can then use less to view the document. But you’ll have too much information to digest and it would be better to filter it by IP or some other field. We normally use grep to do that, but in the case of varnishlog the info is placed one field by line so grep is not useful.