Docs

Error Log Collect Configuration

Configuration reference for the Error Log Collect plugin (`error-log-collect`): the parameters, each attribute with its type, whether it is required, its default and its accepted values.

Parameters

See plugin common configurations (opens in Apache APISIX docs) for configuration options available to all plugins.

vars — array[array] · optional · since API7 Gateway 3.9.6

An array of one or more matching conditions in the form of APISIX expressions (opens in Apache APISIX docs). The buffered logs are flushed to the error log only when all expressions evaluate to true. When unset, the logs are collected for every request.

sample_ratio — number · optional · default: 1 · since API7 Gateway 3.9.6

Valid values: between 0.00001 and 1 inclusive

Probability of collecting the logs for a request. The default value of 1 collects the logs for all requests. Set to a value below 1 to collect the logs for a random sample of requests.

buffer_max_size — integer · optional · default: 1000 · since API7 Gateway 3.9.6

Valid values: greater than or equal to 1

Maximum number of log entries held in the per-worker buffer. When the number of buffered logs exceeds this value, the oldest entries are overwritten.