TraceLogger class
A logger utility that automatically logs the class name along with the log message.
The TraceLogger
class provides methods for different log levels:
debug, info, warning, and error. Each level is associated with unique colors
and emoji for quick visual identification.
Usage example:
final logger = TraceLogger();
class HomeScreen {
void someMethod() {
logger.d('This is a debug log message');
logger.i('This is an info log message');
logger.w('This is a warning log message');
logger.e('This is an error log message');
}
}
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
-
d(
String message) → void - Logs debug strings.
-
e(
String message) → void - Logs error strings.
-
i(
String message) → void - Logs information strings.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
w(
String message) → void - Logs warning strings.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited