In message <[email protected]>, Anders Nordby writes:
>Hi,
>
>I want to use syslog() two places in vcl_recv.
>
>If I put this one two places:
>
>C{
> #include <syslog.h>
> syslog(LOG_ERR, "Bogus request: %s/%s", VRT_GetHdr(sp, HDR_REQ,
> "\005host:"), VRT_r_req_url(sp));
>}C
Outside of any subroutine, you must do the includes, and the calls obviously
from inside:
C{
#include <syslog.h>
}C
sub vcl_recv {
C{
syslog(LOG_ERR, "foobar");
}C
}
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
[email protected] | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-misc mailing list
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc