def show_lambda_logs(config, max_entries, include_lambda_messages): import botocore.session lambda_arn = config['config']['lambda_arn'] client = botocore.session.get_session().create_client('logs') retriever = LogRetriever.create_from_arn(client, lambda_arn) events = retriever.retrieve_logs( include_lambda_messages=include_lambda_messages, max_entries=max_entries) for event in events: print event['timestamp'], event['logShortId'], event['message'].strip()
def show_lambda_logs(config, max_entries, include_lambda_messages): lambda_arn = config.lambda_arn profile = config.profile client = create_botocore_session(profile).create_client('logs') retriever = LogRetriever.create_from_arn(client, lambda_arn) events = retriever.retrieve_logs( include_lambda_messages=include_lambda_messages, max_entries=max_entries) for event in events: print event['timestamp'], event['logShortId'], event['message'].strip()
def show_lambda_logs(session, lambda_arn, max_entries, include_lambda_messages): # type: (Session, str, int, bool) -> None client = session.create_client('logs') retriever = LogRetriever.create_from_arn(client, lambda_arn) events = retriever.retrieve_logs( include_lambda_messages=include_lambda_messages, max_entries=max_entries) for event in events: print event['timestamp'], event['logShortId'], event['message'].strip()
def show_lambda_logs(config, max_entries, include_lambda_messages): # type: (Config, int, bool) -> None lambda_arn = config.lambda_arn profile = config.profile client = create_botocore_session(profile).create_client('logs') retriever = LogRetriever.create_from_arn(client, lambda_arn) events = retriever.retrieve_logs( include_lambda_messages=include_lambda_messages, max_entries=max_entries) for event in events: print event['timestamp'], event['logShortId'], event['message'].strip()
def create_log_retriever(self, session, lambda_arn): # type: (Session, str) -> LogRetriever client = TypedAWSClient(session) retriever = LogRetriever.create_from_arn(client, lambda_arn) return retriever