LogRecord class final

One entry of a LogSink: when, how much it matters, the message, and the error and its stack where there are.

Constructors

LogRecord(DateTime time, LogLevel level, String message, {Object? error, StackTrace? stack})
A record of message at time, at level, with error and stack where there are.
const
LogRecord.fromJson(Map<String, Object?> json)
What toJson made: the error as its text, the stack parsed from its text.
factory

Properties

error → Object?
The error the record is about, or null for none; read back from JSON (LogRecord.fromJson), its text.
final
hashCode → int
The hash code for this object.
no setterinherited
level → LogLevel
How much the record matters.
final
message → String
What the record says.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stack → StackTrace?
Where error was thrown, or null when unknown.
final
time → DateTime
When the record was made, in local time.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
time (ISO 8601), level (its name), message, and the error and the stack as text where there are.
toString() → String
09:05:07.042 warning message: error (formatTime), then the stack on lines of its own.
override

Operators

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

Static Methods

formatTime(DateTime time) → String
The time of day of time as a record shows it (toString, a log view, the console, twk logs): hours, minutes and seconds, two digits each, and milliseconds, three.