Debug

Damon Snyder damon at huddler-inc.com
Wed Feb 8 19:42:42 CET 2012


You can always in-line C and write to syslog. I found that handy (varnish
2.1.5) when we were doing some custom affinity hashing for serving images.
You can do something like:

# add this to the top of your vcl
C{
#include <syslog.h>
#include <stdio.h>
}C

sub vcl_recv { # or other
...

# in some section you want to debug
const char * url = VRT_r_req_url(sp);
syslog(LOG_INFO, "varnish %s ...", url);

...
}

Hope that helps.

Damon


On Wed, Feb 8, 2012 at 10:04 AM, Robson Roberto Souza Peixoto <
robsonpeixoto at gmail.com> wrote:

> Hi,
>
> Are there a command to keep easier the process of debug a vcl ? Something
> like write in log.
>
> thanks
> --
> Robson Roberto Souza Peixoto
> Robinho
> Master in Computer Science, University of Campinas
> Linux Counter #395633
> IRC: robsonpeixoto
> Twitter: http://twitter.com/rrspba
> github: https://github.com/robsonpeixoto
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120208/acd9e59d/attachment.html>


More information about the varnish-misc mailing list