自动删除 Cloud Logging 日志
我想知道是否有一种方法可以定期从Cloud Logging
内部删除日志。
我已经使用 Cloud Functions
设置了 Firebase,并且为每个函数调用完成了自动 Cloud Logging
日志注入。
我不想特别停止向 Cloud Logging
发送日志,但我希望能够通过删除旧日志来管理成本。
I would like to know if there is a way to periodically delete logs from inside Cloud Logging
.
I have setup Firebase with Cloud Functions
and i have an automatic Cloud Logging
logs injection done for each function call.
I don't want especially to stop sending logs to Cloud Logging
, but i would like to be able to manage my costs by deleting older logs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以根据您的要求在 Cloud Logging 存储桶上设置保留政策,该政策可以在 1 天到 10 年后自动删除日志。
You can set a retention policy on your Cloud Logging bucket to match with your requirements, which can auto-delete logs after between 1 day and 10 years.