SimpleOverlayLog class
A simple log entry representing a basic logging event.
This class extends SimpleOverlayBaseLog to provide a simple logging structure
that includes a message and a severity level. It's typically used
for general application logging through LoggerController.log()
.
Example usage:
final log = SimpleLog(
timestamp: DateTime.now(),
tag: 'AUTH',
message: 'User logged in successfully',
level: LogLevel.info,
);
- Inheritance
-
- Object
- SimpleOverlayBaseLog
- SimpleOverlayLog
Constructors
- SimpleOverlayLog.new({required DateTime timestamp, required String tag, required String message, required LogLevel level})
-
Creates a new SimpleOverlayLog instance.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- level → LogLevel
-
The severity level of the log entry.
final
- message → String
-
The main content of the log message.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tag → String
-
A string identifier used to categorize or filter logs.
finalinherited
- timestamp → DateTime
-
The exact date and time when the log entry was created.
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts the log entry to a JSON-serializable map.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromJson(
Map< String, dynamic> json) → SimpleOverlayLog - Creates a SimpleOverlayLog instance from a JSON map.