Menu
AWS Greengrass
API Reference

CreateLoggerDefinition

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

URI: /greengrass/definition/loggers

Operation: POST

Produces: application/json

Parameters:

  • CreateLoggerDefinitionRequestBody

    Information needed to create a logger definition.

    where used: body

    required: true

    schema:

    properties:

    • Name:

      The name of the logger definition.

      type: string

    • InitialVersion:

      Information about the initial version of the logger definition.

      LoggerDefinitionVersion

      type: object

      Information about a logger definition version.

      properties:

      • Loggers

        A list of loggers.

        type: array

        items:

        The logger definition.

        Logger

        type: object

        Information about a logger

        required: Id|Type|Component|Level

        properties:

        • Id:

          The id of the logger.

          type: string

        • Type:

          The type of log output which will be used.

          LoggerType:

          type: string

          enum: FileSystem|AWSCloudWatch

        • Component:

          The component that will be subject to logging.

          LoggerComponent:

          type: string

          enum: GreengrassSystem|Lambda

        • Level:

          The level of the logging.

          LoggerLevel:

          type: string

          enum: DEBUG|INFO|WARN|ERROR|FATAL

        • Space:

          The amount of memory to use, in KB, if the local file system is used for logging.

          type: integer

    Example:

    Copy
    { "Name": "string", "InitialVersion": { "Loggers": [ { "Id": "string", "Type": "FileSystem|AWSCloudWatch", "Component": "GreengrassSystem|Lambda", "Level": "DEBUG|INFO|WARN|ERROR|FATAL", "Space": 0 } ] } }
  • X-Amzn-Client-Token

    A client token used to correlate requests and responses.

    where used: header

    required: false

    type: string

Responses: