Expand description
The error-log-logger node — a reinterpreted subset of APISIX’s
error-log-logger plugin.
In APISIX this plugin tails Nginx’s internal error-log stream (via
ngx.errlog) and forwards those lines to a remote sink. featherbit has no
separate internal error-log stream to tail, so the faithful reinterpretation
is 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). Requests that succeed produce nothing.
Entries are buffered in a BatchSink and delivered by a background task
that opens a fresh [tokio::net::TcpStream] per flush and writes each entry
as one newline-delimited JSON object. Delivery is fire-and-forget on the
request path, so place this node in the response pipeline after the
upstream node (and after any node whose errors you want captured).
§Deviations from APISIX
- Source of logs: featherbit logs request-level errors (
context.errors) rather than the gateway’s own internal error-log lines. - Only the
tcpsink (host/port) is implemented; theskywalking,clickhouse, andkafkasinks are out of scope for this socket-focused node. levelis accepted for compatibility but featherbit filters on the presence of request errors, not on a syslog severity threshold.tlsis not yet supported;tls: trueis rejected at config load.
Structs§
- Error
LogLogger Plugin - The
error-log-loggerplugin node. - TcpFlusher 🔒
BatchFlusherthat connects tohost:portand writes the batch.
Functions§
- entries_
to_ 🔒lines - Serializes each entry as one line of JSON, newline-terminated. Pure helper.