logd_network 0.1.3
logd_network: ^0.1.3 copied to clipboard
Network-based sinks and real-time observability handlers (HTTP batching, WebSocket streaming, live browser dashboard) for logd.
Changelog #
0.1.3 #
SocketSinkReconnect Timer Fix:- Replaced fire-and-forget
Future.delayedwith a cancellableTimerstored on_SocketState. Cancels pending reconnection timers indispose()to prevent memory leaks and unhandled callbacks firing into disposed sinks.
- Replaced fire-and-forget
DropPolicy.blockEager Validation & Deprecation:- Added
@Deprecatedannotation toDropPolicy.blocktargetingv1.0.0removal. - Added eager constructor
assertinNetworkSinkto catch unsupportedDropPolicy.blockconfigurations at construction time rather than during runtime buffer overflow.
- Added
0.1.2 #
- Web & WASM Compatibility:
- Replaced
dart:ioHttpExceptionwithhttp.ClientExceptioninHttpSinkto enable full Web and WASM runtime compatibility across browser targets (restoring 20/20 platform support score).
- Replaced
- Example Tab Discovery Fix:
- Updated
example/main.dartto contain the clean production usage showcase (HttpDashboardHandler+HttpSink) so pub.dev's Example tab renders the production example directly. - Moved interactive CLI menu gallery runner to
example/showcase_gallery.dart. - Hidden deprecated core network exports in examples to prevent shadow analyzer warnings.
- Updated
0.1.1 #
- Pub.dev Score & Example Fixes:
- Hide deprecated core network exports in
example/example.dartto resolve analyzer deprecation warnings. - Added
example/example.dartstandard example entrypoint for automated pub score discovery. - Added
platformsmetadata (android,ios,linux,macos,web,windows) and pubtopicstags for 100% pub.dev score.
- Hide deprecated core network exports in
0.1.0 #
- Initial release of
logd_network, a dedicated satellite package providing HTTP telemetry, WebSocket streaming, and embedded browser dashboards forlogd. HttpSink: High-performance HTTP log collector sink supporting:- In-memory log entry batching (
batchSize,flushInterval). - Exponential backoff retry algorithm with configurable max attempts (
maxRetries). - Configurable drop policies (
DropPolicy.discardOldest,DropPolicy.discardNewest) to prevent memory leaks during endpoint outages. - Custom HTTP headers and authorization token support.
- In-memory log entry batching (
SocketSink: Real-time WebSocket streaming sink supporting:- Frame-by-frame live streaming over
ws://andwss://. - Automatic reconnection logic with configurable
reconnectInterval. - Offline log buffering during network downtime and atomic flush upon reconnection.
- Frame-by-frame live streaming over
HttpServerSink: Embedded local server sink supporting:- Loopback HTTP and WebSocket server hosting on configurable ports (
address,port). - Embedded single-page browser dashboard UI with real-time WebSocket log streaming.
- In-memory ring buffer (
bufferCapacity) to replay past log history to new browser connections.
- Loopback HTTP and WebSocket server hosting on configurable ports (
HttpDashboardHandler: ADR-006 compliant pre-wiredHandlersubclass:- Zero-configuration plug-and-play setup for local browser log monitoring.
- Pre-wires
StructuredFormatter,HtmlEncoder, andHttpServerSinkout of the box.
- Cross-Isolate Serialization:
registerLogdNetworkSerializers()helper for registering deserializers withLoggerSerializationRegistryin background worker isolates.
- Interactive Showcases & Test Harness:
- Interactive CLI showcase gallery in
example/main.dartwith 4 dedicated showcases (http_sink_showcase.dart,socket_sink_showcase.dart,http_server_sink_showcase.dart,http_dashboard_showcase.dart). - Comprehensive unit and integration test suite (17/17 tests passing).
- Interactive CLI showcase gallery in