Transport class abstract
Abstract base class for log transports.
Subclasses implement emitLog to deliver log events to their destination. config accepts arbitrary key/value options to configure the transport without requiring subclass constructor changes.
- Implementers
- Available extensions
Constructors
Properties
-
config
→ Map<
String, dynamic> -
Arbitrary key/value options passed to the transport at construction time.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- level → LogLevel
-
Minimum severity level this transport will handle.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
emitLog(
LogEvent event) → Future< void> -
Performs the actual delivery of
eventto the transport's destination. -
log(
LogEvent event) → Future< void> -
Delivers
eventto the destination ifevent.level >= this.level. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withBuffer(
{int maxSize = 100, Duration? flushInterval}) → BufferedTransport -
Available on Transport, provided by the BufferedTransportExtension extension
Wraps this transport in a BufferedTransport. -
withSampling(
{required double sampleRate, List< LogLevel> levels = const [], Random? random}) → SamplingTransport -
Available on Transport, provided by the SamplingTransportExtension extension
Wraps this transport in a SamplingTransport.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited