LogEntry class
Represents a console log entry.
Captures log messages with severity levels and timestamps for debugging and monitoring purposes.
Constructors
-
LogEntry({String? id, required DevPanelLogLevel level, required String message, DateTime? timestamp, String? tag, Map<
String, dynamic> ? metadata, String? stackTrace}) - Creates a LogEntry with the specified details.
-
LogEntry.debug(String message, {String? tag, Map<
String, dynamic> ? metadata}) -
Convenience constructor for debug logs.
factory
-
LogEntry.error(String message, {String? tag, String? stackTrace, Map<
String, dynamic> ? metadata}) -
Convenience constructor for error logs.
factory
-
LogEntry.info(String message, {String? tag, Map<
String, dynamic> ? metadata}) -
Convenience constructor for info logs.
factory
-
LogEntry.warning(String message, {String? tag, Map<
String, dynamic> ? metadata}) -
Convenience constructor for warning logs.
factory
Properties
- formattedTimestamp → String
-
Formatted timestamp string.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for this log entry.
final
- level → DevPanelLogLevel
-
The severity level of this log entry.
final
- levelName → String
-
Human-readable level name.
no setter
- message → String
-
The log message content.
final
-
metadata
→ Map<
String, dynamic> ? -
Optional additional data attached to the log.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → String?
-
Stack trace if this log was created from an error.
final
- tag → String?
-
Optional tag/category for filtering logs.
final
- timeAgo → String
-
Human-readable relative time (e.g., "19 secs ago").
no setter
- timestamp → DateTime
-
Timestamp when the log was created.
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