Logger class

A simple, configurable logger for the notification wrapper package.

This logger provides different log levels and can be configured to show or hide logs based on the current log level setting.

Example usage:

final logger = Logger('MyClass');
logger.d('Debug message');
logger.i('Info message');
logger.w('Warning message');
logger.e('Error message');
Annotations

Constructors

Logger(String name)
Creates a new logger with the specified name/tag.
const
Logger.forClass(Type type)
Creates a logger with a formatted class name.
factory
Logger.forFeature(String feature)
Creates a logger for a specific feature or module.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
name String
The name/tag for this logger instance
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

d(String message, [Object? error, StackTrace? stackTrace]) → void
Logs a debug message.
e(String message, [Object? error, StackTrace? stackTrace]) → void
Logs an error message.
i(String message, [Object? error, StackTrace? stackTrace]) → void
Logs an info message.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
w(String message, [Object? error, StackTrace? stackTrace]) → void
Logs a warning message.

Operators

operator ==(Object other) bool
The equality operator.
override

Static Properties

logLevel LogLevel
Gets the current global log level.
no setter

Static Methods

setIncludeLoggerName(bool include) → void
Configures logger name inclusion in log messages.
setIncludeTimestamp(bool include) → void
Configures timestamp inclusion in log messages.
setLogLevel(LogLevel level) → void
Sets the global log level for all logger instances.