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, which can indicate the following cache hit/miss status:

  1. Cache Hit
    httpRequest.cacheHit=true
    httpRequest.cacheValidatedWithOriginServer!=true

  2. Cache Hit Validated With Origin Server
    httpRequest.cacheHit=true
    httpRequest.cacheValidatedWithOriginServer=true

  3. Cache Miss
    httpRequest.cacheHit!=true
    httpRequest.cacheLookup=true

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.

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud CDN Documentation