Class LogBuffer
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
A thread-safe ring buffer of log lines. While an app runs with console capture on (the default), everything written to Out and Error lands here (§6.6).
public sealed class LogBuffer
- Inheritance
-
LogBuffer
- Inherited Members
Constructors
LogBuffer(int)
Create a buffer that keeps the last capacity lines.
public LogBuffer(int capacity = 1000)
Parameters
capacityint
Properties
Capacity
The maximum number of lines kept. Older lines are dropped.
public int Capacity { get; }
Property Value
Count
The number of lines currently held.
public int Count { get; }
Property Value
Methods
Add(string, bool)
Append a line, timestamped now.
public void Add(string text, bool isError = false)
Parameters
Clear()
Remove all lines.
public void Clear()
Snapshot()
A copy of the held lines, oldest first.
public IReadOnlyList<LogEntry> Snapshot()