Viewing Logs

Each Google Cloud CDN request is logged in Stackdriver Logging. Logging is automatic and does not need to be enabled.

Viewing logs

To view Cloud CDN logs, go to the Logs Viewer in the Cloud Platform Console.

Cloud CDN logs are indexed first by forwarding rule, then by URL map.

  • 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.

The field jsonPayload.statusDetails can be used to check whether the cache was used. Values of response_from_cache or response_from_cache_validated 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 true. 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.

What's next

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.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud CDN Documentation