LogRecord class

A single log event passed to LogSink.emit.

Constructors

LogRecord({required DateTime time, required LogLevel level, required String message, String? tag, Object? error, StackTrace? stackTrace, Map<String, Object?>? fields})
Creates a record. Callers are Logger / Log; most users never construct.

Properties

error → Object?
Associated error object, if one was passed.
final
fields → Map<String, Object?>?
Structured key/value pairs for this record.
final
hashCode → int
The hash code for this object.
no setterinherited
level → LogLevel
Severity.
final
message → String
Rendered message text. Lazy thunks are resolved before construction.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stackTrace → StackTrace?
Stack trace captured at the call site, if one was passed.
final
tag → String?
Scope name from Log.tag / Logger.tag, if any.
final
time → DateTime
Wall-clock time at emit, taken from package:clock.
final

Methods

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