Reputation: 213
I was just playing around with Cloud Functions
on Firebase
and deployed some random functions to test it out. Now I want to delete all logs
on Firebase console
but I was not able to find a way for that. Is there any CLI
command to do that or is it going to be there for ever or they will be automatically deleted as they age?
Upvotes: 13
Views: 8285
Reputation: 10512
That's just an addition to @Kiana answer.
You can see it directly within the Firebase
console. When trying to choose the timestamp for the logs, logs older than 1 month are disabled, which means are automatically deleted. At least for project's owner, maybe Google stores it somewhere deeper in their logs.
Still, there's no option to delete the logs manually.
Edit: maybe it's good to add, but even if you'll delete your function, the logs of the deleted function still will be there for 1 month.
Upvotes: 1
Reputation: 1506
Cloud Functions log retention is based on the standard Stackdriver limits. For free projects, logs are kept for 7 days. If you upgrade your stackdriver plan it's 30 days.
You can use Stackdriver's deletion api to delete the log entries. The log name for cloud functions should look similar to: projects/<project-id>/logs/cloudfunctions.googleapis.com%2Fcloud-functions"
and can be found using the list api
Upvotes: 16