HttpSink class

HTTP sink that sends logs to a remote endpoint

Inheritance

Constructors

HttpSink({required String endpoint, String method = 'POST', Map<String, String> headers = const <String, String>{}, LogFormatter? formatter, int batchSize = 10, Duration batchTimeout = const Duration(seconds: 30), int maxRetries = 3, Duration retryDelay = const Duration(seconds: 1)})

Properties

batchSize int
final
batchTimeout Duration
final
endpoint String
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
final
isAvailable bool
Check if this sink is available on the current platform
no setteroverride
maxRetries int
final
method String
final
retryDelay Duration
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Clear all logs in this sink (if supported)
inherited
dispose() Future<void>
Dispose any resources used by this sink
override
log(LogEntry entry) Future<void>
Log an entry to this sink
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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