If you've set up remote log streaming, you can log URL purge requests by adding the following VCL to the vcl_recv
subroutine. For example:
1
2
3
if (req.method == "FASTLYPURGE") {
log {"syslog req.service_id <log name> :: "} "event=purge"" service="req.service_id;
}
The log name
must match the name of your logging endpoint in the Fastly web interface.
You can add the VCL via custom VCL or VCL Snippets.
NOTE: Purge all requests are logged in event logs. Key purge requests can't be logged.