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, which can indicate the following cache hit/miss status:
Cache Hit Validated With Origin Server
Log fields of type boolean typically only appear if they have a value of
true. If a boolean field has a value of
false, that field is omitted from
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.