Skip to main content

error-log-logger

error-log-logger

An error-only access logger: it builds the shared access-log entry and ships it to a remote TCP sink only when the request accumulated errors (context.errors is non-empty). Successful requests produce nothing.

Delivery is fire-and-forget. Place this node in the response pipeline after the upstream node (and after any node whose errors you want captured).

Configuration

KeyTypeDefaultDescription
hoststring— (required)TCP sink hostname or IP.
portinteger— (required)TCP sink port (0–65535).
timeoutinteger (s)3Connect/send timeout.
levelstring"WARN"Accepted for config compatibility. featherbit logs on the presence of context.errors, not on a syslog severity threshold. Must be one of STDERR, EMERG, ALERT, CRIT, ERR, ERROR, WARN, NOTICE, INFO, DEBUG.
tlsboolfalseNot yet supportedtrue is rejected at config load.
log_formatobjectCustom name -> "$var" entry; replaces the default structured entry.
batch_max_sizeinteger1000Entries per batch; 1 flushes every entry immediately.
inactive_timeoutinteger (s)5Flush when idle this long.
buffer_durationinteger (s)60Flush when the oldest buffered entry is this old.
max_retry_countinteger0Retries after a failed flush.
retry_delayinteger (s)1Delay between retries.
max_pending_entriesinteger10000Queue capacity; entries are dropped (with a warning) when full.
- id: error-log
type: error-log-logger
config:
host: 127.0.0.1
port: 5044

Behavior

When context.errors is non-empty, builds the shared access-log entry (which includes the errors array) and pushes it to the batch sink as one newline-delimited JSON object. When there are no errors, nothing is emitted. The node is a pure passthrough: only its success port is ever taken.

Behavior notes

  • Source of logs: featherbit logs request-level errors (context.errors) rather than the gateway's own internal error-log lines — featherbit has no internal error-log file to tail.
  • Only the tcp sink (host/port) is implemented; the skywalking, clickhouse, and kafka sinks are out of scope for this socket-focused node.
  • level is accepted but not enforced as a severity threshold.
  • tls is not yet supported; tls: true is rejected at config load.