LogDiagnostic class final

A message from the library about its own operation: a sink failure, a store queue overflow, an entry logged after the logger was closed.

Such messages do not go into the log: with a broken sink or store they would produce new entries and new failures. Instead they go to the DiagnosticReporter given to the root (RootLogger), which passes it to sinks when they are attached.

message is written by the library and carries no entry data. error and stackTrace come from outside and may carry it: SqliteException prints query parameters, which for a store write is the whole entry; an exception from parsing another isolate's message carries its fragments. Console output in release builds is therefore limited to message (consoleText).

Annotations
  • @immutable

Constructors

LogDiagnostic(String message, {Object? error, StackTrace? stackTrace})
const

Properties

error → Object?
The error, if the message reports a failure.
final
hashCode → int
The hash code for this object.
no setterinherited
message → String
What happened, prefixed with the source name: RootLogger: sink failed.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stackTrace → StackTrace?
final

Methods

consoleText(BuildMode buildMode) → String
Console text for build mode buildMode. In release, only message: the release console is the device's system log, readable via adb and included in crash reports, where ConsoleSink deliberately writes no entry data, while error and stackTrace may carry it. In debug and profile, the full toString.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
Message, error and stack trace in full.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited