Each Google Cloud CDN request is logged in Stackdriver Logging. Logging is automatic and does not need to be enabled.
To view Cloud CDN logs, go to the Logs Viewer in the Cloud Platform Console.
- To see all logs, in the first pull-down menu select Load Balancing > All forwarding rules.
- To see logs for just one forwarding rule, select a single forwarding rule name from the list.
- To see logs for just one URL map used by a forwarding rule, select Load Balancing and choose the forwarding rule and URL map of interest.
What is logged
In addition to general information contained in most logs, such as severity, project ID, project number, and timestamp, HTTP(S) load balancing logs contain HttpRequest log fields.
jsonPayload.statusDetails can be used to check whether the cache was
used. Values of
indicate a cache hit, while
response_sent_by_backend is a cache miss.
Log fields of type boolean typically only appear if they have a value of
If a boolean field has a value of
false, that field is omitted from the log.
UTF-8 encoding is enforced for these fields. Characters that are not UTF-8 characters are replaced with question marks.
Refer to the Stackdriver Logging documentation for more information, including how to export logs and how to use logs-based metrics for monitoring and alerting.