2024-04-18 23:59:34 发布
网友
我想通过python脚本获得stackdriver日志,而不需要接收器
我在stackdriver日志项目中拥有读取权限。因此,我可以使用“gcloud logging read”命令读取日志。 但当我尝试将日志写入文件时,Unicode字符显示为??。 (当写入标准输出而不是写入文件时,它看起来很好。)
我想以不同于gcloud SDK的方式读取日志。 所以我想用python下载GCP的日志。不幸的是,我没有权限,所以我必须使用read。有API文档可供我参考吗
谢谢:)
通常是appcfg tool is used to download logs。此工具现在已弃用。目前替换的CloudSDK不支持此下载功能;但是,您可以使用gcloud app log commands查看日志
不要忘记权限。 “The sink's writer identity does not have permission to write logs to the destination. Errors occur until the sink's writer has permission to write log entries to the destination.”
请查看此Using exported logs了解更多详细信息,以及此link至Download log entries
通常是appcfg tool is used to download logs。此工具现在已弃用。目前替换的CloudSDK不支持此下载功能;但是,您可以使用gcloud app log commands查看日志
不要忘记权限。 “The sink's writer identity does not have permission to write logs to the destination. Errors occur until the sink's writer has permission to write log entries to the destination.”
请查看此Using exported logs了解更多详细信息,以及此link至Download log entries
相关问题 更多 >
编程相关推荐