airflow.providers.amazon.aws.utils.task_log_fetcher

Module Contents

Classes

AwsTaskLogFetcher

Fetch Cloudwatch log events with specific interval and send the log events to the logger.info.

class airflow.providers.amazon.aws.utils.task_log_fetcher.AwsTaskLogFetcher(*, log_group, log_stream_name, fetch_interval, logger, aws_conn_id='aws_default', region_name=None)[source]

Bases: threading.Thread

Fetch Cloudwatch log events with specific interval and send the log events to the logger.info.

run()[source]

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

static event_to_str(event)[source]
get_last_log_messages(number_messages)[source]

Get the last logs messages in one single request.

NOTE: some restrictions apply: - if logs are too old, the response will be empty - the max number of messages we can retrieve is constrained by cloudwatch limits (10,000).

get_last_log_message()[source]
is_stopped()[source]
stop()[source]

Was this entry helpful?