structured_log_flutter library

Classes

LogBuffer
A fixed-size, in-memory ring buffer of log entries, meant to be plugged directly into structured_log as an OutputFunction (or a LogSink's output) so a UI can display a live-updating tail of recent log entries.
LogViewerController
Headless state for a log viewer UI: search, level and category filters, pause/resume, and clearing, all applied on top of a LogBuffer.
LogViewerLabels
The user-visible strings of a log viewer skin (structured_log_material, structured_log_fluent, structured_log_cupertino), so an app can show the viewer in its own language.
LogViewerLocalizations
Ready-made LogViewerLabels for English and Russian, delivered through Flutter's Localizations — optional: register delegate and every log viewer skin picks the labels up for the app's locale, with no labels passed by hand.

Functions

debugPrintOutput(Map<String, dynamic> entry, LogLevel level) → void
An OutputFunction for a phone's console: one line per entry through debugPrint, with no ANSI colours — the time, the level, the event, and every other field as escaped key=value pairs:
logLevelColor(LogLevel level, Brightness brightness) → Color
The single source of truth for LogLevel indicator colors across every design-system skin built on this package (structured_log_material, structured_log_fluent, structured_log_cupertino, ...) — every place that needs a level color calls this rather than hard-coding its own copy of the palette, so the mapping can't drift between skins.
logLevelOf(Map<String, dynamic> entry) → LogLevel?
Returns the LogLevel a log entry was recorded at, by matching its level context key (set by every entry via structured_log's BoundLogger) against LogLevel.values' names — or null if the key is missing, not a string, or doesn't match a known level name.