본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

파일 로그 플러그인 구성 참조

원문 보기 위키 갱신

파일 로그 플러그인 구성 참조 (File Log Plugin Configuration Reference)

이 문서는 Kong의 File Log 플러그인 설정을 정의하는 스키마를 한눈에 볼 수 있게 정리한 구성 참조 자료예요. 로그를 기록할 파일 경로(path) 지정 방법과, 요청마다 로그 파일을 닫았다가 다시 여는 reopen 옵션, Lua 코드로 커스텀 필드를 추가하는 custom_fields_by_lua 설정까지 차근차근 살펴볼 수 있어요. 또한 플러그인이 동작하는 프로토콜 목록과 서비스·라우트·컨슈머 단위로 적용 범위를 제한하는 방법도 함께 안내해요

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "custom_fields_by_lua": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Lua code as a key-value map",
          "type": "object"
        },
        "path": {
          "description": "The file path of the output log file. The plugin creates the log file if it doesn't exist yet.",
          "type": "string"
        },
        "reopen": {
          "default": false,
          "description": "Determines whether the log file is closed and reopened on every request.",
          "type": "boolean"
        }
      },
      "required": [
        "path"
      ],
      "type": "object"
    },
    "consumer": {
      "additionalProperties": false,
      "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "expressions": {
      "additionalProperties": true,
      "type": "object"
    },
    "protocols": {
      "default": [
        "grpc",
        "grpcs",
        "http",
        "https"
      ],
      "description": "A set of strings representing protocols.",
      "items": {
        "description": "A string representing a protocol, such as HTTP or HTTPS.",
        "enum": [
          "grpc",
          "grpcs",
          "http",
          "https",
          "tcp",
          "tls",
          "tls_passthrough",
          "udp",
          "ws",
          "wss"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "route": {
      "additionalProperties": false,
      "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "service": {
      "additionalProperties": false,
      "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "required": [
    "config"
  ]
}

더 알아보기 (Learn more)

이 문서에는 원문에서 추출한 별도의 관련 문서 링크가 없어요.