Logging Purge Requests


1 comment

  • Hiro

    Hi Owen,

    Yes, you can log the purge URL requests from the vcl_recv subroutine. I believe there is a syntax error inside your <log string>. More than happy to double check what you've set in the <log string> if you could send it to support@fastly.com.

    Meanwhile, I'll share a sample of the log format for the <log string> through the VCL snippet. Hope this will help.

    if (req.method == "FASTLYPURGE") {
      log {"syslog "} req.service_id {" <LOG NAME> :: "} "[" strftime({"%d/%b/%Y:%H:%M:%S %z"}, time.start) "] " req.request " - URL: " json.escape(req.url) ", Client IP: " req.http.Fastly-Client-IP;

    Best, Hiro

    Comment actions Permalink

Please sign in to leave a comment.