Skip to main content

Module entry

Module entry 

Source
Expand description

Log entry prefix identification and multi-line JSON accumulation.

Detects log entry boundaries using the [UnityCrossThreadLogger], [Client GRE], [ConnectionManager], and Matchmaking: header patterns, then accumulates subsequent lines until the next header boundary to form complete raw entries.

§Header classification (Phase 1 of #153)

Each detected header is classified as either single-line or multi-line:

  • Single-line: [UnityCrossThreadLogger] followed by anything other than a date digit (e.g., alpha labels like STATE CHANGED, Client.SceneChange, or ==> API request markers), [ConnectionManager]…, and Matchmaking:…. These entries are flushed in the same LineBuffer::push_line call that received them — no continuation accumulation.
  • Multi-line: [UnityCrossThreadLogger]<digit> (date-prefixed API responses, match events) and [Client GRE]…. These entries accumulate continuation lines until the next header boundary, matching the historical behavior.

§Data flow

File Tailer ──(raw lines)──▸ LineBuffer ──(complete entries)──▸ Router

The LineBuffer receives individual lines from the file tailer. When a new log entry header is detected, it flushes the previously accumulated lines as a complete LogEntry and either emits the new entry immediately (single-line class) or begins accumulating it (multi-line class).

Structs§

LineBuffer
Accumulates raw lines and produces complete LogEntry values when a new header boundary is detected.
LogEntry
A complete log entry extracted from the line buffer.

Enums§

EntryHeader
The known log entry header prefixes in MTG Arena’s Player.log.