LoggerBase class
Base logger implementation with sink management and filtering
Constructors
Properties
-
defaultContext
→ UnmodifiableMapView<
String, dynamic> -
no setter
-
filters
→ UnmodifiableListView<
LogFilter> -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
logStream
→ Stream<
LogEntry> -
Stream of all log entries processed by this logger
no setter
- minimumLevel ↔ LogLevel
-
Minimum log level for this logger
getter/setter pair
- name → String?
-
Optional name for this logger instance
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sinks
→ UnmodifiableListView<
LogSink> -
no setter
Methods
-
addFilter(
LogFilter filter) → void - Add a filter to this logger
-
addSink(
LogSink sink) → void - Add a sink to this logger
-
addToDefaultContext(
String key, dynamic value) → void - Add to default context
-
debug(
String message, {String? tag, Object? error, StackTrace? stackTrace, Map< String, dynamic> ? context}) → void -
debugLazy(
String messageBuilder(), {String? tag, Object? error, StackTrace? stackTrace, Map< String, dynamic> ? context}) → void -
dispose(
) → Future< void> - Dispose resources
-
error(
String message, {String? tag, Object? error, StackTrace? stackTrace, Map< String, dynamic> ? context}) → void -
errorLazy(
String messageBuilder(), {String? tag, Object? error, StackTrace? stackTrace, Map< String, dynamic> ? context}) → void -
fatal(
String message, {String? tag, Object? error, StackTrace? stackTrace, Map< String, dynamic> ? context}) → void -
fatalLazy(
String messageBuilder(), {String? tag, Object? error, StackTrace? stackTrace, Map< String, dynamic> ? context}) → void -
info(
String message, {String? tag, Object? error, StackTrace? stackTrace, Map< String, dynamic> ? context}) → void -
infoLazy(
String messageBuilder(), {String? tag, Object? error, StackTrace? stackTrace, Map< String, dynamic> ? context}) → void -
isEnabled(
LogLevel level) → bool - Check if a log level is enabled
-
log(
LogLevel level, String message, {String? tag, Object? error, StackTrace? stackTrace, Map< String, dynamic> ? context}) → void - Log a message at the specified level
-
logLazy(
LogLevel level, String messageBuilder(), {String? tag, Object? error, StackTrace? stackTrace, Map< String, dynamic> ? context}) → void - Log with lazy message evaluation
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeFilter(
LogFilter filter) → void - Remove a filter from this logger
-
removeSink(
LogSink sink) → void - Remove a sink from this logger
-
toString(
) → String -
A string representation of this object.
inherited
-
trace(
String message, {String? tag, Object? error, StackTrace? stackTrace, Map< String, dynamic> ? context}) → void - Convenience methods for each log level
-
traceLazy(
String messageBuilder(), {String? tag, Object? error, StackTrace? stackTrace, Map< String, dynamic> ? context}) → void - Lazy evaluation convenience methods
-
updateDefaultContext(
Map< String, dynamic> context) → void - Update default context
-
warn(
String message, {String? tag, Object? error, StackTrace? stackTrace, Map< String, dynamic> ? context}) → void -
warnLazy(
String messageBuilder(), {String? tag, Object? error, StackTrace? stackTrace, Map< String, dynamic> ? context}) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited