Class ExporterIndexLogForwarder

java.lang.Object
ai.attackframework.tools.burp.sinks.ExporterIndexLogForwarder
All Implemented Interfaces:
Logger.LogListener

public final class ExporterIndexLogForwarder extends Object implements Logger.LogListener
Forwards selected exporter log events to the Exporter index.

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 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 Workers so shutdown semantics match every other extension-owned worker.

    • onLog

      public void onLog(String level, String message)
      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 exporter source is disabled, the current level is not selected, or no sink is enabled.

      Specified by:
      onLog in interface Logger.LogListener