MultiLogger class
A logger that delegates log entries to multiple underlying loggers.
- Inheritance
-
- Object
- BaseLogger
- MultiLogger
Constructors
-
MultiLogger({required List<
BaseLogger> loggers, LoggerFormatter? formatter, LoggerDateFormatter? dateFormatter})
Properties
- dateFormatter ↔ LoggerDateFormatter?
-
The date formatter for log messages.
getter/setter pairinherited
- formatter ↔ LoggerFormatter
-
The formatter for log messages.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for the logger.
finalinherited
-
loggers
→ List<
BaseLogger> -
The list of underlying loggers.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addLogger(
BaseLogger logger) → void - Adds a logger to the list of underlying loggers.
-
dispose(
) → void -
Disposes the logger and releases any resources.
override
-
info(
String message, String scope) → void -
Logs an informational message.
messageis the log message.scopeis the scope or context of the log.override -
log(
Level level, String message, String scope, dynamic exception, StackTrace? stackTrace, LoggerFormatter formatter) → void -
Writes a log entry.
levelis the severity level of the log.messageis the log message.scopeis the scope or context of the log.throwableis an optional error or exception associated with the log.stackTraceis an optional stack trace associated with the log.formatteris a function to format the log message.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeLogger(
BaseLogger logger) → void - Removes a logger from the list of underlying loggers.
-
severe(
String message, String scope, Exception? exception, StackTrace? stackTrace) → void -
Logs a severe error message.
messageis the log message.scopeis the scope or context of the log.exceptionis the associated exception.stackTraceis the associated stack trace.override -
shout(
String message, String scope, Error? error, StackTrace? stackTrace) → void -
Logs a shout message.
messageis the log message.scopeis the scope or context of the log.erroris the associated error.stackTraceis the associated stack trace.override -
toString(
) → String -
A string representation of this object.
inherited
-
warning(
String message, String scope) → void -
Logs a warning message.
messageis the log message.scopeis the scope or context of the log.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited