logging - 向 Google Cloud Build 日志输出添加时间戳

标签 logging google-cloud-platform timestamp continuous-integration google-cloud-build

我们正在使用 Cloud BuildGoogle Cloud Platform .

是否可以为日志输出的每一行添加时间戳?

最佳答案

@Methkal Khalawi 上面的评论中的解决方案开箱即用:而不是在 GCP 控制台的 CloudBuild 选项卡中查看 CloudBuild 日志,它看起来像这样: enter image description here

... 打开日志记录(堆栈驱动程序)选项卡并从下拉框中选择云构建。这将向您显示您在 Cloud Build 选项卡中看到的相同日志,但现在带有时间戳,如下所示: enter image description here

关于logging - 向 Google Cloud Build 日志输出添加时间戳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61077004/

相关文章:

python - UTF-8 在 Python 日志记录中,如何?

git - 仅可视化 git 分支拓扑,没有提交历史

google-cloud-platform - 具有云负载均衡器的不同区域的 Google 容器引擎集群

google-cloud-platform - 抢占式虚拟机如何工作?

java - 在 Java 中输出 RFC 3339 时间戳

java - H2 数据库 - CSVREAD - 将时间戳从 csv 读取到时间戳列

php - 如何使用 PHP 中的 log() 获取曲线上的点?

javascript - 如何使 console.log 显示对象的当前状态?

google-app-engine - 我可以从 Google Cloud Storage artifacts 存储桶中删除容器镜像吗?

git rebase 不改变提交时间戳