LogRecord class

Represents a single log entry.

Constructors

LogRecord({required LogLevel level, required String message, required DateTime timestamp, Map<String, dynamic>? data, Map<String, dynamic>? context})
Creates a new LogRecord.

Properties

context Map<String, dynamic>?
Contextual data (e.g., Request-ID).
final
data Map<String, dynamic>?
Additional metadata associated with the log.
final
hashCode int
The hash code for this object.
no setterinherited
level LogLevel
The severity of the log.
final
message String
The log message.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp DateTime
The time the log was created.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the record to a JSON-compatible map.
toString() String
A string representation of this object.
inherited

Operators

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