{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "add_logging_action",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name for the new logging action"
    },
    "target": {
      "type": "string",
      "enum": ["memory", "disk", "echo", "remote", "email"],
      "description": "Where log messages are written"
    },
    "remote": {
      "description": "Remote syslog server address (target=remote)",
      "type": "string"
    },
    "remote_port": {
      "description": "Remote syslog UDP port",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "src_address": {
      "description": "Source address used when sending to remote syslog (target=remote)",
      "type": "string"
    },
    "bsd_syslog": {
      "description": "Use BSD-style syslog format",
      "type": "boolean"
    },
    "syslog_facility": {
      "type": "string"
    },
    "syslog_severity": {
      "type": "string"
    },
    "syslog_time_format": {
      "description": "Syslog timestamp format, e.g. 'bsd' or 'iso8601'",
      "type": "string"
    },
    "disk_file_name": {
      "description": "File name for target=disk",
      "type": "string"
    },
    "disk_lines_per_file": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "disk_file_count": {
      "description": "Number of files used to store log (target=disk)",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "disk_stop_on_full": {
      "description": "Stop saving once disk-lines-per-file is reached (target=disk)",
      "type": "boolean"
    },
    "memory_lines": {
      "description": "Lines kept for target=memory",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "memory_stop_on_full": {
      "description": "Stop saving once memory-lines is reached (target=memory)",
      "type": "boolean"
    },
    "remember": {
      "description": "Keep messages not yet displayed in console (target=memory)",
      "type": "boolean"
    },
    "email_to": {
      "description": "Recipient address for target=email",
      "type": "string"
    },
    "disabled": {
      "default": false,
      "type": "boolean"
    }
  },
  "required": ["name", "target", "disabled"],
  "additionalProperties": false
}
