The text of an entry for output: to the console (ConsoleSink.format), to a file or a report
(exportLog).
The format decides how to show an entry; the sink or export decides where to write it. So one format
prints both to the console and to a file (ConsoleSink(format: LogExportFormat.jsonLines) gives
structured output for a server), and changing how entries look in the console does not require
subclassing the sink: passing another format is enough.
Built-in formats: ConsoleLogFormat (a line with level icon, tags and stack trace), LogExportFormat
(report text, JSON lines), and in Flutter FlutterConsoleFormat with Flutter error diagnostics.
- Implementers
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
format(
LogEntry entry) → String? -
The text of
entrywithout a trailing newline, possibly multi-line (stack trace).nullmeans the entry is not printed: for example, the console does not show a Flutter error withFlutterErrorDetails.silentoutside debug. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited