public sealed class LogOverlayThe tail of the log ring, on screen, with a level filter.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The overlay that makes a build self-describing. RingBufferSink is on in every build — that is the whole point of it — so the last thirty lines are always there to be shown, including on a device with no console attached and no way to get a file off it, which is the case this exists for.
⚠ The tail is copied, not snapshotted. The ring holds a hundred thousand records by default; calling Snapshot once a frame to read the last thirty would allocate megabytes a frame. CopyTail fills a fixed buffer this overlay owns.
⚠ Long lines are cut rather than wrapped. Wrapping a stack trace into a corner panel turns thirty records into three; the cut end is what a log tail is for — the beginning of the message says which one it is, and the full text is in the ring for whoever reads it properly.
Fields and properties (8)
public const int MaxLinesHow many records the overlay can show at once.
public string NameWhat the console and the toggles call it. Lower case, no spaces.
public OverlayAnchor AnchorWhich corner it is pinned to.
public bool EnabledWhether it is drawn.
public float WidthHow wide the panel is, in pixels.
public int LinesHow many lines are shown.
public LogLevel MinimumLevelThe level below which records are not shown. Does not change what is recorded.
public bool ShowCategoryWhether the logger's category is shown before the message.
Methods (2)
public LogOverlay(RingBufferSink sink)Reads from a sink.
public void Draw(OverlaySurface surface, in GameTime time)Draws it.
Used by (1)
- DiagnosticOverlayTestsVixen.Engine.Tests