LogMessage constructor
const
LogMessage({})
Constructs an instance of LogMessage.
message
: The main content of the log message.level
: The severity level of the log message, represented by LogLevel.timestamp
: The date and time when the log message was created.error
: Optional. Any error object associated with the log message.stackTrace
: Optional. The stack trace associated with the log message, typically provided when logging errors.context
: Optional. Additional contextual information provided as a map, which can be useful for debugging.
Implementation
const LogMessage({
required this.message,
required this.level,
required this.timestamp,
this.error,
this.stackTrace,
this.context,
});