Debug

Robson Roberto Souza Peixoto robsonpeixoto at gmail.com
Thu Feb 9 12:05:06 CET 2012


Thanks. Excellent tips.

[ ]s

On Thu, Feb 9, 2012 at 7:55 AM, Geoff Simmons <geoff at uplex.de> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On Wed, Feb 8, 2012 at 10:04 AM, Robson Roberto Souza Peixoto
>  <robsonpeixoto at gmail.com <mailto:robsonpeixoto at gmail.com>> wrote:
> >
> > Are there a command to keep easier the process of debug a vcl ?
> > Something like write in log.
>
> On 2/8/12 7:42 PM, Damon Snyder wrote:
> > 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);
> >
> > ... }
>
> If you're in Varnish 3.x, you can just use the standard VMOD and call
> log() (to log into varnishlog) or syslog():
>
> https://www.varnish-cache.org/docs/3.0/reference/vmod_std.html#log
>
>
> Best,
> Geoff
> - --
> UPLEX Systemoptimierung
> Schwanenwik 24
> 22087 Hamburg
> http://uplex.de/
> Mob: +49-176-63690917
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQIcBAEBCAAGBQJPM5gYAAoJEOUwvh9pJNUReLoP/jgP2IP/anStrLGhSczAKEOF
> UAoiwuX+U8eIu9x2CrgL1q+KdTVJ1ljR6ho/mTxrs1YUiUOSMOp7PScpiIE/ytMv
> UnL1SeaV8Q0+c+z/tHcZSWXfzeVDLcTRyVQSbWkVylefMqL2+I9HNT1raQ42zTst
> geD+NwGfPHU1VTiUl+Al+c8t37MkY+sUDHJNyzHjCqlUAgUmUS5+ruerMZR+5I3D
> ggaqE8JjHfJF0TOsO27a8RmcQ94kyeESztLHIA3Kgn3zdkcdJeC9vqFI1SaYWnPB
> BFXbWzb6cRjvts3md3zbZOL4UHOGjUD7J9KTl50HFT2LSEbCDbXPPkC5meNvfOPG
> INIPspScUDyrsIsUkeAXkXal0nKU/Oko+VQyTcD1JkScad7TqgiLPgmcJqPYWp3B
> FctNN9FJ0002N/bARkmHTVScxwE5M+ajimJkabiq1eC6EGxYSc9H6BOMzrz28VeC
> TaZUAx0wQ32FXOxwwIBh9ECWkgLzCmN+1kRABIQuSf6zgr/naOV9un3eAo24LgMy
> 9dUCWZxSri8sW6qz9AEwRUtmZtyWd8wToy33+WOi0AWUCl8yzH/X90WPSKK+HlEt
> OTmAuPkhgB+gmY7/gf0BgOCx4AdxpLnqnFny4K1TgKwFm1+rYpD/zEH1GyXd8XFy
> Ut+ZkyBpcg9w6RMqdbFr
> =bDN/
> -----END PGP SIGNATURE-----
>



-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120209/7d1545a6/attachment.html>


More information about the varnish-misc mailing list