:doc:`IoT <../../iot>` / Client / get_v2_logging_options

**********************
get_v2_logging_options
**********************



.. py:method:: IoT.Client.get_v2_logging_options(**kwargs)

  

  Gets the fine grained logging options.

   

  Requires permission to access the `GetV2LoggingOptions <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/GetV2LoggingOptions>`_  


  **Request Syntax**
  ::

    response = client.get_v2_logging_options(
        verbose=True|False
    )
    
  :type verbose: boolean
  :param verbose: 

    The flag is used to get all the event types and their respective configuration that event-based logging supports.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'roleArn': 'string',
          'defaultLogLevel': 'DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED',
          'disableAllLogs': True|False,
          'eventConfigurations': [
              {
                  'eventType': 'string',
                  'logLevel': 'DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED',
                  'logDestination': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **roleArn** *(string) --* 

        The IAM role ARN IoT uses to write to your CloudWatch logs.

        
      

      - **defaultLogLevel** *(string) --* 

        The default log level.

        
      

      - **disableAllLogs** *(boolean) --* 

        Disables all logs.

        
      

      - **eventConfigurations** *(list) --* 

        The list of event configurations that override account-level logging.

        
        

        - *(dict) --* 

          Configuration for event-based logging that specifies which event types to log and their logging settings. Used for account-level logging overrides.

          
          

          - **eventType** *(string) --* 

            The type of event to log. These include event types like Connect, Publish, and Disconnect.

            
          

          - **logLevel** *(string) --* 

            The logging level for the specified event type. Determines the verbosity of log messages generated for this event type.

            
          

          - **logDestination** *(string) --* 

            CloudWatch Log Group for event-based logging. Specifies where log events should be sent. The log destination for event-based logging overrides default Log Group for the specified event type and applies to all resources associated with that event.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.InternalException`

  
  *   :py:class:`IoT.Client.exceptions.NotConfiguredException`

  
  *   :py:class:`IoT.Client.exceptions.ServiceUnavailableException`

  