Skip to main content

Module tailer

Module tailer 

Source
Expand description

Polling-based file tailer with rotation detection.

Polls Player.log at a configurable interval (default 50 ms) for new data, detecting file rotation (MTGA restart) by monitoring file size and modification time.

§Data flow

Player.log ──(poll 50 ms)──▸ FileTailer ──(raw lines)──▸ LineBuffer

The FileTailer opens the log file read-only with shared access, seeks to the end on startup (tail mode), and reads only new bytes from the last offset on each poll cycle. Raw lines are fed into the LineBuffer for entry boundary detection.

Structs§

FileTailer
Polls a log file for new data at a configurable interval.
RotationInfo
Metadata about a detected log file rotation.

Enums§

TailerError
Errors that can occur during file tailing operations.