Class ExporterIndexLogForwarder
- All Implemented Interfaces:
Logger.LogListener
Registers as a Logger.LogListener; each log event is queued and pushed asynchronously
by a single worker thread. Events are forwarded only when export is ready, the
exporter source is enabled, the corresponding exporter log level is selected, and at
least one sink is active.
Delivery is fire-and-forget: failures are not logged back into the same stream to avoid feedback loops. If the queue is full, the oldest event is dropped to make room for the newest event.
-
Constructor Summary
ConstructorsConstructorDescriptionStarts the background worker that drains queued exporter log documents. -
Method Summary
-
Constructor Details
-
ExporterIndexLogForwarder
public ExporterIndexLogForwarder()Starts the background worker that drains queued exporter log documents.Safe to construct during extension startup. The worker is daemon-backed and remains idle until runtime export state allows queued events to be emitted.
-
-
Method Details
-
stop
public void stop()Stops the background drain worker and clears any queued log documents.Safe to call multiple times. Used during extension unload so hot reload does not leave a stale forwarder thread behind. Delegates termination to
Workersso shutdown semantics match every other extension-owned worker. -
onLog
Queues one exporter log event when the current runtime configuration allows export.Safe to call from any thread. Returns immediately when export is not ready, the
exportersource is disabled, the current level is not selected, or no sink is enabled.- Specified by:
onLogin interfaceLogger.LogListener
-