How to use the crhelper.log_helper function in crhelper

To help you get started, we’ve selected a few crhelper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws-quickstart / quickstart-cloud9-ide / functions / source / c9DiskResize / crhelper / resource_helper.py View on Github external
def _log_setup(self, event, context):
        if self._json_logging:
            log_helper.setup(self._log_level, boto_level=self._boto_level, RequestType=event['RequestType'],
                             StackId=event['StackId'], RequestId=event['RequestId'],
                             LogicalResourceId=event['LogicalResourceId'], aws_request_id=context.aws_request_id)
        else:
            log_helper.setup(self._log_level, boto_level=self._boto_level, formatter_cls=None)
github aws-quickstart / quickstart-cloud9-ide / functions / source / c9DiskResize / crhelper / resource_helper.py View on Github external
self.LogicalResourceId = ""
        self.Data = {}
        self._event = {}
        self._context = None
        self._response_url = ""
        self._sam_local = os.getenv('AWS_SAM_LOCAL')
        self._region = os.getenv('AWS_REGION')
        try:
            if not self._sam_local:
                self._lambda_client = boto3.client('lambda', region_name=self._region)
                self._events_client = boto3.client('events', region_name=self._region)
                self._logs_client = boto3.client('logs', region_name=self._region)
            if json_logging:
                log_helper.setup(log_level, boto_level=boto_level, RequestType='ContainerInit')
            else:
                log_helper.setup(log_level, formatter_cls=None, boto_level=boto_level)
        except Exception as e:
            logger.error(e, exc_info=True)
            self.init_failure(e)
github aws-cloudformation / custom-resource-helper / crhelper / resource_helper.py View on Github external
def _log_setup(self, event, context):
        if self._json_logging:
            log_helper.setup(self._log_level, boto_level=self._boto_level, RequestType=event['RequestType'],
                             StackId=event['StackId'], RequestId=event['RequestId'],
                             LogicalResourceId=event['LogicalResourceId'], aws_request_id=context.aws_request_id)
        else:
            log_helper.setup(self._log_level, boto_level=self._boto_level, formatter_cls=None)
github aws-quickstart / quickstart-amazon-eks / functions / source / crhelperLayer / python / crhelper / resource_helper.py View on Github external
def _log_setup(self, event, context):
        if self._json_logging:
            log_helper.setup(self._log_level, boto_level=self._boto_level, RequestType=event['RequestType'],
                             StackId=event['StackId'], RequestId=event['RequestId'],
                             LogicalResourceId=event['LogicalResourceId'], aws_request_id=context.aws_request_id)
        else:
            log_helper.setup(self._log_level, boto_level=self._boto_level, formatter_cls=None)
github aws-cloudformation / custom-resource-helper / crhelper / resource_helper.py View on Github external
def _log_setup(self, event, context):
        if self._json_logging:
            log_helper.setup(self._log_level, boto_level=self._boto_level, RequestType=event['RequestType'],
                             StackId=event['StackId'], RequestId=event['RequestId'],
                             LogicalResourceId=event['LogicalResourceId'], aws_request_id=context.aws_request_id)
        else:
            log_helper.setup(self._log_level, boto_level=self._boto_level, formatter_cls=None)
github aws-quickstart / quickstart-amazon-eks / functions / source / crhelperLayer / python / crhelper / resource_helper.py View on Github external
self.StackId = ""
        self.RequestId = ""
        self.LogicalResourceId = ""
        self.Data = {}
        self._event = {}
        self._context = None
        self._response_url = ""
        self._sam_local = os.getenv('AWS_SAM_LOCAL')
        self._region = os.getenv('AWS_REGION')
        try:
            if not self._sam_local:
                self._lambda_client = boto3.client('lambda', region_name=self._region)
                self._events_client = boto3.client('events', region_name=self._region)
                self._logs_client = boto3.client('logs', region_name=self._region)
            if json_logging:
                log_helper.setup(log_level, boto_level=boto_level, RequestType='ContainerInit')
            else:
                log_helper.setup(log_level, formatter_cls=None, boto_level=boto_level)
        except Exception as e:
            logger.error(e, exc_info=True)
            self.init_failure(e)

crhelper

crhelper simplifies authoring CloudFormation Custom Resources

Apache-2.0
Latest version published 10 days ago

Package Health Score

84 / 100
Full package analysis

Similar packages