Apache Beam记录带有错误标签的消息

问题描述

错误日志未登录GCP控制台。
警告日志会将日志记录为信息(因此我一直在使用它们来记录信息消息)。例如,

test = "hello debug world" 
logging.warning("%s",test) # will log as info message in GCP dataflow console

信息日志也不会登录控制台。

我正在使用Apache Beam Python 3.7 SDK 2.23.0,but this seems to be an old issue

Apache Beam SDK本身也会发生这种情况,该日志有时会静记录错​​误作为信息。

enter image description here

知道这是什么原因吗?似乎是Apache Beam方面的错误,而不是脚本错误

解决方法

您必须将下拉值从“信息”更改为更高的日志级别,才能查看ErrorWarning类型的消息。在screeenshot中,日志级别设置为Info,并且您正在日志条目中搜索字符串错误,并且堆栈驱动程序正在基于该错误进行过滤。