Skip to content
ConsoleMonster
Class

LogTailView

ConsoleMonster.Live.Tails

Namespace
ConsoleMonster.Live.Tails
Assembly
ConsoleMonster
Modifiers
sealed

A bounded log viewport with queued appends and navigation. LogRegion owns storage and line rendering.

Inheritance

Usage

Explore 4 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Accepted by parameters 2

Constructors

public LogTailView(int capacity = 1000, string name = "tail", string? highlight = null) #

Creates a view that initially follows the newest entry.

Parameters

capacity int = 1000 optional
Maximum retained history entries. Pending updates are not discarded.
name string = "tail" optional
Unique live-session target name.
highlight string? = null optional
Optional literal, ordinal case-insensitive substring to emphasize.

Methods

public override void Apply(LiveEvent liveEvent) #

Applies an event to the widget's state.

Parameters

liveEvent ConsoleMonster.Live.LiveEvent required
The event.
public override Size Measure(Constraints constraints, RenderContext context) #

Returns the size the widget wants within the constraints.

Parameters

constraints ConsoleMonster.Layout.Constraints required
The space offered.
context ConsoleMonster.Canvas.RenderContext required
Profile, theme and glyphs.

Returns

Size The desired size, never larger than the constraints.
public bool Navigate(ILiveDispatcher dispatcher, InputEvent input) #

Queues a recognized navigation key. Quit keys are handled by the runner.

Parameters

dispatcher ConsoleMonster.Live.ILiveDispatcher required
The owning session or dispatcher.
input ConsoleMonster.Input.InputEvent required
An event from a ConsoleInput lease.

Returns

bool True when the key is a navigation command.
public void Post(ILiveDispatcher dispatcher, TailedLogEntry entry) #

Queues a literal entry through the session. May be called by a producer thread.

Parameters

dispatcher ConsoleMonster.Live.ILiveDispatcher required
The owning session or dispatcher.
entry ConsoleMonster.Live.Tails.TailedLogEntry required
The original line and source metadata.
public override void Render(Region region, RenderContext context) #

Renders into a region. The region may be smaller or larger than the measured size.

Parameters

region ConsoleMonster.Canvas.Region required
The target region.
context ConsoleMonster.Canvas.RenderContext required
Profile, theme and glyphs.

Properties

public bool Following { get; private set; } #

Whether the viewport follows new entries. Read after dispatch or on the render thread.

public string? TimestampFormat { get; set; } #

Invariant source timestamp format, or null for time only, adding dates when retained source dates differ. The format and timestamp column are independent of terminal width; missing timestamps stay blank.

public long DiscardedHistoryLines { get; } #

Lines evicted from bounded retained history after application.

public IReadOnlyCollection<LogEntry> Entries { get; } #

Retained entries, oldest first. Enumerate on the render thread or after stopping the session.

Extension Methods

public static LogTailView WithTimestampFormat(LogTailView logTailView, string? value) #

Sets LogTailView.TimestampFormat: Invariant source timestamp format, or null for time only, adding dates when retained source dates differ. The format and timestamp column are independent of terminal width; missing timestamps stay blank.

Parameters

logTailView ConsoleMonster.Live.Tails.LogTailView required
The instance.
value string? required
The value.

Returns

LogTailView The same instance.