:doc:`Greengrass <../../greengrass>` / Client / create_logger_definition

************************
create_logger_definition
************************



.. py:method:: Greengrass.Client.create_logger_definition(**kwargs)

  Creates a logger definition. You may provide the initial version of the logger definition now or use ''CreateLoggerDefinitionVersion'' at a later time.

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/greengrass-2017-06-07/CreateLoggerDefinition>`_  


  **Request Syntax**
  ::

    response = client.create_logger_definition(
        AmznClientToken='string',
        InitialVersion={
            'Loggers': [
                {
                    'Component': 'GreengrassSystem'|'Lambda',
                    'Id': 'string',
                    'Level': 'DEBUG'|'INFO'|'WARN'|'ERROR'|'FATAL',
                    'Space': 123,
                    'Type': 'FileSystem'|'AWSCloudWatch'
                },
            ]
        },
        Name='string',
        tags={
            'string': 'string'
        }
    )
    
  :type AmznClientToken: string
  :param AmznClientToken: A client token used to correlate requests and responses.

  
  :type InitialVersion: dict
  :param InitialVersion: Information about the initial version of the logger definition.

  
    - **Loggers** *(list) --* A list of loggers.

    
      - *(dict) --* Information about a logger

      
        - **Component** *(string) --* **[REQUIRED]** The component that will be subject to logging.

        
        - **Id** *(string) --* **[REQUIRED]** A descriptive or arbitrary ID for the logger. This value must be unique within the logger definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.

        
        - **Level** *(string) --* **[REQUIRED]** The level of the logs.

        
        - **Space** *(integer) --* The amount of file space, in KB, to use if the local file system is used for logging purposes.

        
        - **Type** *(string) --* **[REQUIRED]** The type of log output which will be used.

        
      
  
  
  :type Name: string
  :param Name: The name of the logger definition.

  
  :type tags: dict
  :param tags: Tag(s) to add to the new resource.

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'Arn': 'string',
          'CreationTimestamp': 'string',
          'Id': 'string',
          'LastUpdatedTimestamp': 'string',
          'LatestVersion': 'string',
          'LatestVersionArn': 'string',
          'Name': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Arn** *(string) --* The ARN of the definition.
      

      - **CreationTimestamp** *(string) --* The time, in milliseconds since the epoch, when the definition was created.
      

      - **Id** *(string) --* The ID of the definition.
      

      - **LastUpdatedTimestamp** *(string) --* The time, in milliseconds since the epoch, when the definition was last updated.
      

      - **LatestVersion** *(string) --* The ID of the latest version associated with the definition.
      

      - **LatestVersionArn** *(string) --* The ARN of the latest version associated with the definition.
      

      - **Name** *(string) --* The name of the definition.
  
  **Exceptions**
  
  *   :py:class:`Greengrass.Client.exceptions.BadRequestException`

  