logd_network 0.1.1
logd_network: ^0.1.1 copied to clipboard
Network-based sinks and real-time observability handlers (HTTP batching, WebSocket streaming, live browser dashboard) for logd.
Changelog #
0.1.1 #
- Web & WASM Compatibility:
- Replaced
dart:ioHttpExceptionwithhttp.ClientExceptioninHttpSinkto enable full Web and WASM runtime compatibility across browser targets.
- Replaced
- Example & Developer Experience:
- Hide deprecated core network exports in
example/example.dartto prevent shadow analyzer warnings. - Added standalone
example/example.dartentrypoint.
- Hide deprecated core network exports in
- Package Metadata:
- Added explicit target platform declarations (
android,ios,linux,macos,web,windows) and topic tags (logging,network,http,websocket,observability).
- Added explicit target platform declarations (
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