LogFormatter class abstract
LogFormatter
defines an interface for formatting log messages. Implementations
of this class should convert log messages and their associated data (such as log
level, timestamp, error information, and stack traces) into a string format suitable
for display or storage. This allows for customizable log message layouts and the
inclusion of relevant information as needed.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
format(
{required LogLevel level, required String message, required DateTime timestamp, String? error, StackTrace? stackTrace}) → String - Formats a log message into a string based on the given parameters. This method should organize the log level, message, timestamp, and any error or stack trace information into a coherent and readable format.
-
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