Export Firebase data into Cloud Logging

Exporting data from various Firebase products into Cloud Logging lets you view, search, filter, and query logs from your project and apps. Using the exported data, you can create and use log-based metrics, build charts and custom dashboards, and set up custom alerts.

The following products support data export to Cloud Logging:

  • Firebase Hosting: After you set up export, Firebase exports web request logs from your Firebase Hosting sites to Cloud Logging.

  • Firebase App Hosting: No need to set up export; Firebase automatically exports logs for Firebase App Hosting to Cloud Logging.

  • Cloud Functions for Firebase: No need to set up export; Firebase automatically exports logs for functions to Cloud Logging.


This page helps you with the following:

What can you do with data exported to Cloud Logging

Cloud Logging is provided by the Google Cloud Observability Suite.

Here are some ways that you can work with data exported to Cloud Logging:

  • You can use the Logs Explorer in the Google Cloud console to view, search, and filter these logs.

  • You can query your logs, create and use log-based metrics, build charts and custom dashboards, set up custom alerts, and store your logs data.

  • You can export your data to other service providers.

Learn more about these options in the general Cloud Logging documentation, as well as the product-specific page for Firebase Hosting.

Note that for Cloud Functions for Firebase, you can also view your logs in the Functions dashboard of the Firebase console.



Set up export to Cloud Logging

Here's how to set up export to Cloud Logging:

  1. Sign in to the Firebase console, then select your project.

  2. Click , then select Project Settings.

  3. Select the Integrations tab.

  4. On the Cloud Logging integration card, click Link.

  5. Follow the on-screen instructions to set up export to Cloud Logging.

    If you already have one or more active Firebase Hosting sites, the linking workflow displays an estimated data usage level for logs from each of your sites. This value is estimated based on logs volume from the previous 30 days.

Unlinking from Cloud Logging stops any new logs from being exported.

Unlinking from Cloud Logging can only stop export for Firebase App Hosting and Firebase Hosting. You cannot stop export of logs for Cloud Functions for Firebase.

Be aware of the following:

  • Any data already exported into Cloud Logging will persist for the allowed retention time, and storage charges may still apply. You can manually delete your logs to prevent any further billing.

  • If you have Cloud Logging data stored in other services (like BigQuery), that data might be governed by different terms for data persistence.

You can unlink from Cloud Logging at the Firebase project level, at the product-level, or at the backend- or site-level for a specific product.

Here's how to unlink from Cloud Logging:

  1. In the Firebase console, go to the Integrations page.

  2. In the Cloud Logging card, click Manage.

  3. Choose to unlink a specific product or to unlink a specific backend or site for a specific product.

    To unlink your Firebase project entirely, find the button at the bottom of the page.

  4. When prompted, confirm that you want to stop exports.



What happens after you set up export?

After setting up data export, you can expect the following.

Firebase Hosting

  • View logs for any new requests to your Hosting sites usually within 30 minutes of a request being made.

  • Monitor your data usage levels:

    • View the data usage level for logs from your Hosting sites in the Cloud Logging integration card in the Firebase console.

    • View your per-site data usage level in the Logs Explorer in the Google Cloud console (the log_bytes metric). If your project uses Cloud Logging for other products, you can also view total usage in the Logs Explorer.



Cloud Logging quotas, pricing, and retention

Cloud Logging offers a no-cost level of usage per month (per project). The usage can be from any Google or Firebase product using Cloud Logging. You can upgrade your project to the pay-as-you-go Blaze pricing plan to unlock additional paid usage and features. Learn more about pricing for Cloud Logging.

You can monitor and manage Cloud Logging and billing:

Logs are automatically deleted after 30 days, with the option to set custom retention.

Note that the log entry for a particular request or event may be delayed or, in rare cases, dropped. While logs can be used to understand requests or events, they may not reflect the true usage that appears in your project usage and billing.