将日志写入 Amazon Cloudwatch

远程日志记录到 Amazon Cloudwatch 使用现有的 Airflow 连接来读取或写入日志。 如果您没有正确设置连接,则此过程将失败。

要启用此功能,必须按如下方式配置 airflow.cfg

[logging]
# Airflow can store logs remotely in AWS Cloudwatch. Users must supply a log group
# ARN (starting with 'cloudwatch://...') and an Airflow connection
# id that provides write and read access to the log location.
remote_logging = True
remote_base_log_folder = cloudwatch://arn:aws:logs:<region name>:<account id>:log-group:<group name>
remote_log_conn_id = MyCloudwatchConn

在上面的示例中,Airflow 将尝试使用 AwsLogsHook('MyCloudwatchConn')

此条目有帮助吗?