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

********************
set_v2_logging_level
********************



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

  

  Sets the logging level.

   

  Requires permission to access the `SetV2LoggingLevel <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/SetV2LoggingLevel>`_  


  **Request Syntax**
  ::

    response = client.set_v2_logging_level(
        logTarget={
            'targetType': 'DEFAULT'|'THING_GROUP'|'CLIENT_ID'|'SOURCE_IP'|'PRINCIPAL_ID',
            'targetName': 'string'
        },
        logLevel='DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED'
    )
    
  :type logTarget: dict
  :param logTarget: **[REQUIRED]** 

    The log target.

    

  
    - **targetType** *(string) --* **[REQUIRED]** 

      The target type.

      

    
    - **targetName** *(string) --* 

      The target name.

      

    
  
  :type logLevel: string
  :param logLevel: **[REQUIRED]** 

    The log level.

    

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

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

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

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

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

  