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

Transport({LogLevel level = LogLevel.info, Map<String, dynamic> config = const {}})
Creates a transport.

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 event to the transport's destination.
log(LogEvent event) Future<void>
Delivers event to the destination if event.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.

Operators

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