Class LogTail
The log lines of one node that this browser tab has seen, kept while the tab is open (see
), so that coming back to the node's log page shows them at once and fetches only what
is new. The node numbers its lines from 0 in each process and keeps the newest of them (2000 by default):
the first visit reads the newest lines; "load older" pages back from the oldest one
shown, at a time, as far as the node still has them;a return reads everything after the last line seen, in one go; lines the node dropped from its buffer in the
meantime are shown as one "N lines skipped" marker;a restart of the node (its start time in the topology changed, or its newest line is older than the last one
seen) starts the tail anew with a marker, since the new process numbers its lines from 0 again.
public sealed class LogTail
Inheritance
Properties
Capacity
Rows kept at most; the oldest go first, and "load older" brings them back.
public int Capacity { get; }
HasOlder
Whether the node may still have lines older than the oldest one held.
public bool HasOlder { get; }
StartedAt
The node's start time when the tail was read, if the topology knows it.
public DateTimeOffset? StartedAt { get; }
Methods
Clear()
Empties the view; new lines keep coming, and "load older" brings the cleared ones back.
public void Clear()
LoadOlderAsync(ILogSource, CancellationToken)
Reads the lines before the oldest one held and puts them on top.
public Task LoadOlderAsync(ILogSource source, CancellationToken ct)
SyncAsync(ILogSource, DateTimeOffset?, bool, CancellationToken)
Brings the tail up to date: the first page on the first visit, otherwise every line after the last one seen.
public Task SyncAsync(ILogSource source, DateTimeOffset? startedAt, bool poll, CancellationToken ct)
Constructors
LogTail(string, int)
Creates the tail of node nodeId, keeping at most capacity rows.