Skip to content

Capture Modes

Output Destinations and Subscriptions ​

In v2.12.0, --output routes runtime logs and captured events. Without the flag, the destination is stdout. Explicit destinations replace that default. Repeat the flag once per destination to keep two copies.

bash
sudo ecapture tls --model text --text-source pcapng \
  --output stdout --output capture.jsonl

What each destination receives ​

DestinationText modeNative keylog modeNative pcapng mode
--output stdout or stderrLabeled logs and decoded textLogs and labeled NSS linesLogs and labeled byte-count summaries
--output PATH or file:///PATHProtobuf v2 JSON Lines, logs and TEXT eventsJSON Lines, runtime logs onlyJSON Lines, runtime logs only
--output tcp://HOST:PORTOutgoing JSON Lines with logs and TEXTLogs and KEYLOG bytesLogs and PCAPNG bytes
--stream-listen ws://HOST:PORT/PATHIncoming subscribers receive binary v2 logs/eventsBinary v2 with KEYLOG bytesBinary v2 with PCAPNG bytes

Each terminal line identifies log_type=log or log_type=event, the module and, for an event, its capture format. In JSON, PROCESS_LOG and EVENT use the same v2 LogEntry schema. Keep native artifact paths separate from --output files. Output API

Subscribe to the collector ​

bash
sudo ecapture tls --model text --text-source pcapng \
  --stream-listen ws://127.0.0.1:28256/

Connect the receiver to the configured path and negotiate the WebSocket subprotocol ecapture.v2. Each binary message contains one Protobuf v2 LogEntry. A new subscriber receives a collector_info snapshot identifying the host, build, active module, mode, source and destinations, then recent runtime logs and future events. The listener is disabled by default and supplies plain WS without built-in authentication. For eCaptureQ on the same host, enter ws://127.0.0.1:28256/ as the source. eCaptureQ quick start Wire format · Receiver example

TCP output connects to an already-listening receiver. TCP records are newline-delimited JSON. For a native EVENT, decode the corresponding keylog.data or pcapng.data field and append its bytes in order. ProtoJSON base64-encodes bytes. Record boundaries can divide an NSS line or pcapng block.

Starting a new capture generation on reload closes the connections. TCP reconnects, whereas WebSocket clients must resubscribe. Write a fresh receiver file per connection. A late pcapng subscriber gets headers and future packets and secrets only. TCP EOF alone does not confirm completion, so keep interrupted artifacts partial. The collector appends to its local native file across reloads. Connection and completion rules

Migrate v2.8–v2.11 commands ​

Former optionv2.12.0 change
--eventaddr, --logaddr, -lRepeat --output for terminal, file and TCP destinations. Update file/TCP readers to decode v2 JSON Lines.
Outgoing ws:// or wss:// outputs, --ecaptureqUse a v2 WebSocket client connecting to --stream-listen, or a JSON Lines receiver for outgoing TCP.
--listenUse --config-listen HOST:PORT to enable the separate HTTP configuration service.
--eventroratesize, --eventroratetimeRemove both flags. v2.12.0 has no CLI option for file rotation.
Implicit keylog/pcapng output or redirected stdoutSpecify local --keylogfile or --pcapfile for the corresponding native mode.

These legacy options have no aliases. Destinations and listener addresses are fixed at startup. Restart the collector to change them. v2.12.0 migration details

Output Destinations and Subscriptions has loaded

Released under the MIT License.