0

I have found that an error occurred in my app over a month ago. It is most likely due to an issue with a firebase cloud function which I have added logging to. Unfortunately via the firebase control panel or GCP I can't view logs older than one month.

Is there any way to view these?

If there is not is there any way to export and save these to file?

MadMac
  • 4,048
  • 6
  • 32
  • 69

2 Answers2

0

If you can't see it in the console, then it's not available. You can use the Firebase CLI to view/print logs, but only recent entries.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
0

I did it as follows. Thanks to @Neelavar for pointing me in the right direction. More information here: Log retention in Stackdriver GCP

-- Run as admin

VScode on windows

Right click the shortcut or app/exe

Go to properties

Check "Run this program as an administrator"

-- Install gcloud Alpha (as admin)
gcloud components install alpha

-- List all projects (optional)
gcloud projects list

-- Set current project
gcloud config set project my-project

-- Check correct project selected (optional)
gcloud config get-value project

-- Update retention period
gcloud alpha logging buckets update _Default --location=global --retention-days=365
MadMac
  • 4,048
  • 6
  • 32
  • 69