Troubleshoot Logs Explorer

This document explains common log viewing issues, and describes how to use theGoogle Cloud console to view and troubleshoot configuration mistakes orunexpected results.

Download of logs fails

You are using the Logs Explorer and clickDownload.The command starts but then fails to complete or reports an error.

To resolve this issue, reduce the time it takes for the command to executeby trying the following:

  • In theDownload logs dialog, reduce the value ofMaximum log entries.
  • Reduce the time period over which logs are queried.
  • In the query results toolbar, clickHide similar entries before youbegin the download.
Note: The download feature isn't intended for the bulk download of logs. Youcancopy logs to a Cloud Storage bucket.

Can't find console logs for a VM instance

Logs written to the console of a Compute Engine instance might not be available in the Logs Explorer.To view these logs, do the following:

  1. In the Google Cloud console, go to theVM instances page:

    Go toVM instances

    If you use the search bar to find this page, then select the result whose subheading isCompute Engine.

  2. Select the instance, and then selectSerial port 1 (console) in theLogs section of the page.

You can configure your instances such that their serial port output issent to Cloud Logging. For more information, seeEnabling and disabling serial port output logging.

Get Google Cloud project or organization ID

To get a Google Cloud project or organization ID from anywhere in theGoogle Cloud console, expand the list of Google Cloud projects from theGoogle Cloud project and organization selector and find theGoogle Cloud project ID in theID column.

Can't see log entries

If you don't see any log entries, check the following:

  • Verify that the correct Google Cloud project is selected.

  • Verify that your Google Cloud project is using resources that generatelogs and that thereis activity on those resources. Even if the Google Cloud project isnew, it should have audit logs recording the fact that it was created.For information about how to verify thatyou're using a resource that generates logs, seeMapping services to resource types.

  • Ensure that the time range isn't too narrow.

  • View yourcurrent exclusion queriesto ensure that the logs you're looking for aren't accidentally excluded.

  • Ensure that you have permission to view the log entries in the projects andlog views referenced by setting of theRefine scope menu.For information about how to adjust the scope of your search, seeRefine scope.

My query is correct but I still don't see log entries

  • You can't see log entries that are older than the Loggingretention period. SeeLog retention periods for thelogs retention period in effect.

  • During periods of heavy load, there could be delays in sending logs toLogging or in receiving and displaying the logs.

  • The Logs Explorer doesn't show log entries that have timestamps in thefuture until the current time has "caught up" with them. This is an unusualsituation, probably caused by a time skew in the application sending thelogs.

  • The query scope was set too large and couldn't complete within a reasonableamount of time. You might see this as "deadline expired beforeoperation could complete". Try making your query more specific or reducingthe time range.

Query returns an error

If you issue a query over a resource without specifying a bucket, thenCloud Logging uses the history of the sinks in the Google Cloud project todetermine where entries might have been written for that resource. IfCloud Logging identifies more than 200 buckets where entriesmight have been written, then the query fails with the messageError: Invalid query.

To resolve this issue, refine the scope of your query to a subset of thestorage. For more information, seeRefine scope.

Query results time range doesn't match query

The logs data you see in theQuery results andFields pane adjustsaccording to the time range captured by the histogram timeline. You adjust thehistogram timeline using the histogram's time controls or thetime-range selector.Adjusting these time controls doesn't alterthe query expression in theQuery pane.

When you have a query with a timestamp, the time-range selector is disabled.The query uses the timestamp expression as its time-range restriction.If a query doesn't use a timestamp expression, then the query uses thetime-range selector as its time-range restriction.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-18 UTC.