我有一个在AI平台上进行在线预测的端点(统一的),只有带有严重度 >=错误的日志才能找到。
模型使用:--enable-container-logging部署
容器中的记录器代码:
module_logger = logging.getLogger("MODULE_NAME")
module_logger.setLevel(logging.INFO)
handler = logging.StreamHandler()
handler.setFormatter("%(asctime)s — %(name)s — %(levelname)s — %(funcName)s:%(lineno)d — " "%(message)s")
module_logger.addHandler(handler)查询: resource.type="aiplatform.googleapis.com/Endpoint" resource.labels.endpoint_id="ENDPOINT_ID" resource.labels.location="us-central1"
两个问题:
发布于 2021-05-19 15:28:46
回答我自己:
stderr日志被解释为具有严重性ERROR,而stdout是INFOhttps://stackoverflow.com/questions/67584220
复制相似问题