airflow.providers.amazon.aws.log.cloudwatch_task_handler
¶
Module Contents¶
Classes¶
CloudwatchTaskHandler is a python log handler that handles and reads task instance logs. |
- class airflow.providers.amazon.aws.log.cloudwatch_task_handler.CloudwatchTaskHandler(base_log_folder, log_group_arn, filename_template=None)[source]¶
Bases:
airflow.utils.log.file_task_handler.FileTaskHandler
,airflow.utils.log.logging_mixin.LoggingMixin
CloudwatchTaskHandler is a python log handler that handles and reads task instance logs.
It extends airflow FileTaskHandler and uploads to and reads from Cloudwatch.
- Parameters
base_log_folder (str) – base folder to store logs locally
log_group_arn (str) – ARN of the Cloudwatch log group for remote log storage with format
arn:aws:logs:{region name}:{account id}:log-group:{group name}
filename_template (str | None) – template for file name (local storage) or log stream name (remote)
- set_context(ti)[source]¶
Provide task_instance context to airflow task handler.
Generally speaking returns None. But if attr maintain_propagate has been set to propagate, then returns sentinel MAINTAIN_PROPAGATE. This has the effect of overriding the default behavior to set propagate to False whenever set_context is called. At time of writing, this functionality is only used in unit testing.
- Parameters
ti – task instance object