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

**********************
set_v2_logging_options
**********************



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

  

  Sets the logging options for the V2 logging service.

   

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


  **Request Syntax**
  ::

    response = client.set_v2_logging_options(
        roleArn='string',
        defaultLogLevel='DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED',
        disableAllLogs=True|False,
        eventConfigurations=[
            {
                'eventType': 'string',
                'logLevel': 'DEBUG'|'INFO'|'ERROR'|'WARN'|'DISABLED',
                'logDestination': 'string'
            },
        ]
    )
    
  :type roleArn: string
  :param roleArn: 

    The ARN of the role that allows IoT to write to Cloudwatch logs.

    

  
  :type defaultLogLevel: string
  :param defaultLogLevel: 

    The default logging level.

    

  
  :type disableAllLogs: boolean
  :param disableAllLogs: 

    If true all logs are disabled. The default is false.

    

  
  :type eventConfigurations: list
  :param eventConfigurations: 

    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) --* **[REQUIRED]** 

        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.

        

      
    

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

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

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

  