IsolatedLogWriter class
A LogWriter that runs a wrapped writer on a dedicated isolate.
Not a high-throughput sink. Every operation is copied across the isolate boundary, so payloads must be sendable.
- Implemented types
Constructors
-
IsolatedLogWriter(Factory<
LogWriter> factory) -
Creates an IsolatedLogWriter that runs the writer produced by
factoryon a dedicated isolate.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool
-
Whether
closehas been called. Once true, furtherevaluatecalls throw a StateError.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> -
Shuts down the isolate. Idempotent. Any outstanding
evaluatecalls are failed with a StateError rather than left to hang.inherited -
closeScope(
LogScope scope, {required bool success, required Duration duration, Object? error, StackTrace? stackTrace}) → Future< void> -
Ends a scoped operation.
override
-
evaluate<
U> (FutureOr< U> function(LogWriter)) → Future<U> -
Evaluates
functionon the isolated object and returns the result.inherited -
log(
LogEntry entry) → Future< void> -
Writes a single log entry.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openScope(
LogScope scope) → Future< void> -
Begins a scoped operation.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited