Answers: <p>Got it.</p>
  <p>Thanks to <a href="https://stackoverflow.com/a/72530077/20003774">@maslick</a>, all i had to do was <strong>explicitly set an appropriate logging level</strong>.</p>
  <pre><code># Use this logger to forward log messages to CloudWatch Logs.
  
  LOG = logging.getLogger(__name__)
  LOG.setLevel(logging.INFO)            # &lt;- this line was missing
  </code></pre>
  <p>When deploying stack, log groups appears. Yay.</p>
  
Answers: CC BY-SA 4.0
Answers: 2022-09-15T14:03:14.640Z
Answers: 2022-09-15T14:03:14.640Z
Answers: user981231237
Body: <p>I am developing a <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-private.html" rel="nofollow noreferrer">private resource type</a> for AWS <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html" rel="nofollow noreferrer">Cloudformation Registry</a>. I have designed my model schema and developed my handler code, <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-walkthrough.html#resource-type-walkthrough-submit" rel="nofollow noreferrer">submitted</a> it, and even successfully deployed a stack with my very own private resource type. Yay.</p>
  <p>What i need to do now is inspect the logging thereof. As I had generated the scaffolding using the cfn init command, i merely added logging entries to the existing logger object.</p>
  <p>e.g.</p>
  <pre><code># Use this logger to forward log messages to CloudWatch Logs.
  LOG = logging.getLogger(__name__)
  TYPE_NAME = &quot;Myself::Test::Resourceful&quot;
  
  resource = Resource(TYPE_NAME, ResourceModel)
  test_entrypoint = resource.test_entrypoint
  
  
  @resource.handler(Action.CREATE)
  def create_handler(
          session: Optional[SessionProxy],
          request: ResourceHandlerRequest,
          callback_context: MutableMapping[str, Any],
  ) -&gt; ProgressEvent:
      model = request.desiredResourceState
      progress: ProgressEvent = ProgressEvent(
          status=OperationStatus.IN_PROGRESS,
          resourceModel=model,
      )
      # TODO: put code here
  
      LOG.info('Creating....')
  </code></pre>
  <p>According to the <a href="https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-develop.html#resource-type-develop-log" rel="nofollow noreferrer">literature</a>,</p>
  <blockquote>
  <p>When you register a resource type using cfn submit, CloudFormation
  creates a CloudWatch log group for the resource type in your account.
  This enables you to access the logs for your resource to help you
  diagnose any faults. The log group is named according to the following
  pattern:</p>
  <p>/my-resource-type-stack-ResourceHandler-string</p>
  <p>Now, when you initiate stack operations for stacks that contain the
  resource type, CloudFormation delivers log events emitted by the
  resource type to this log group.</p>
  </blockquote>
  <p>When submitting my resource type however (and even deploying it), a cannot see any LogGroup created in CloudWatch whatsoever. There is clearly something i am missing here.</p>
  <p><strong>Please help me understand how to find the logging for my private Cloudformation registry resource types.</strong></p>
  <p>Of course, i will be happy to provide any additional info needed. Thank you!</p>
  
Tags: <amazon-web-services><aws-cloudformation>
Title: How to find logs when submitting resource type to Cloudformation Registry?
UserDisplayName: user981231237
ThreadText: # How to find logs when submitting resource type to Cloudformation Registry?
  
  (Asked by: username_0 on 2022-09-15)
  
  I am developing a [private resource type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-private.html) for AWS [Cloudformation Registry](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html). I have designed my model schema and developed my handler code, [submitted](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-walkthrough.html#resource-type-walkthrough-submit) it, and even successfully deployed a stack with my very own private resource type. Yay.
  
  What i need to do now is inspect the logging thereof. As I had generated the scaffolding using the cfn init command, i merely added logging entries to the existing logger object.
  
  e.g.
  
  ```
  # Use this logger to forward log messages to CloudWatch Logs.
  LOG = logging.getLogger(__name__)
  TYPE_NAME = "Myself::Test::Resourceful"
  
  resource = Resource(TYPE_NAME, ResourceModel)
  test_entrypoint = resource.test_entrypoint
  
  @resource.handler(Action.CREATE)
  def create_handler(
          session: Optional[SessionProxy],
          request: ResourceHandlerRequest,
          callback_context: MutableMapping[str, Any],
  ) -> ProgressEvent:
      model = request.desiredResourceState
      progress: ProgressEvent = ProgressEvent(
          status=OperationStatus.IN_PROGRESS,
          resourceModel=model,
      )
      # TODO: put code here
  
      LOG.info('Creating....')
  
  ```
  
  According to the [literature](https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-develop.html#resource-type-develop-log),
  
  > When you register a resource type using cfn submit, CloudFormation
  > creates a CloudWatch log group for the resource type in your account.
  > This enables you to access the logs for your resource to help you
  > diagnose any faults. The log group is named according to the following
  > pattern:
  >
  > /my-resource-type-stack-ResourceHandler-string
  >
  > Now, when you initiate stack operations for stacks that contain the
  > resource type, CloudFormation delivers log events emitted by the
  > resource type to this log group.
  
  When submitting my resource type however (and even deploying it), a cannot see any LogGroup created in CloudWatch whatsoever. There is clearly something i am missing here.
  
  **Please help me understand how to find the logging for my private Cloudformation registry resource types.**
  
  Of course, i will be happy to provide any additional info needed. Thank you!
  
  **Tags:** amazon-web-services, aws-cloudformation
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-09-15. Score: 0 | Accepted answer
  
  Got it.
  
  Thanks to [@maslick](https://stackoverflow.com/a/72530077/20003774), all i had to do was **explicitly set an appropriate logging level**.
  
  ```
  # Use this logger to forward log messages to CloudWatch Logs.
  
  LOG = logging.getLogger(__name__)
  LOG.setLevel(logging.INFO)            # <- this line was missing
  
  ```
  
  When deploying stack, log groups appears. Yay.
  
  
  ---
  
  