Vixen
02b45cc4
csharp
public sealed class LogOverlay

The 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 MaxLines

    How many records the overlay can show at once.

  • public string Name

    What the console and the toggles call it. Lower case, no spaces.

  • public OverlayAnchor Anchor

    Which corner it is pinned to.

  • public bool Enabled

    Whether it is drawn.

  • public float Width

    How wide the panel is, in pixels.

  • public int Lines

    How many lines are shown.

  • public LogLevel MinimumLevel

    The level below which records are not shown. Does not change what is recorded.

  • public bool ShowCategory

    Whether the logger's category is shown before the message.

Methods (2)

Used by (1)

  • DiagnosticOverlayTestsVixen.Engine.Tests