Hide
Cloud Logging

Getting Started With Google Cloud Logging

Get started using Google Cloud Logging by going through the following steps:

Enable Cloud Logging

No matter what you want to do with Cloud Logging, you must enable the service for your project:

  1. Sign up for Google Cloud Platform and create a project. You will need to enable billing to use Cloud Logging.

  2. Enable the Cloud Logging API.

Quickstart

Go through the following steps to begin using Cloud Logging.

Get some logs

In order to try out Cloud Logging, get some logs flowing into your project by doing one or both of the following:

  • Sign up for Google Compute Engine. Use the Compute Engine quickstart tutorials to create a virtual machine instance. Installing a web server would be a nice idea, but creating the instance is enough.

  • Sign up for Google App Engine. Use the App Engine quickstart tutorials to get a simple web server app running.

Later, you can get more log activity:

  • Access your web server more frequently, with different parameters.
  • Sign up for Google Cloud Monitoring and create Uptime checks on your App Engine or Compute Engine enpoints. These checks will cause a steady stream of activity through your web server.
  • Install the logging agent on your Compute Engine instance.

Visit the Logs Viewer

Go to the Monitoring > Logs page of the Google Developers Console. You'll see a screen like the following:

Logs Viewer

In the leftmost drop-down menu, select either App Engine or Compute Engine, depending on which service you began to use:

  • If you chose App Engine, you should see some request_log entries from running your web servier.
  • If you chose Compute Engine, you should see some activity_log entries caused by your creation of the virtual machine instance.

See Logs Viewer for more information.

Install the logging agent

If you are using Compute Engine, see Install the logging Agent. The logging agent streams virtual machine instance logs to Cloud Logging.

Export your logs

You can export your App Engine and Compute Engine logs to Google Cloud Storage, Google BigQuery, or Google Cloud Pub/Sub. See Logs Export for more information.

When the logs have been exported, see Using exported logs to learn how to access the exported logs.