如何使用 Python SDK 调试自定义接收器

how can I debug custom sink with Python SDK

我在使用 Python SDK 编写自定义接收器时遇到问题。 为了调试它,我使用了 logging.info 或 print 方法,但它不能很好地工作。 有什么调试自定义接收器的好方法吗?

您在日志记录方面遇到了哪些问题?

当 运行 使用数据流管道 运行 时,日志应该可以在 Cloud Console 中访问,如 Logging Pipeline Messages 中所述。

您也可以使用直接 运行ner 在本地执行管道,这可能更容易调试。