dio_smart_logger 0.3.0
dio_smart_logger: ^0.3.0 copied to clipboard
Structured and secure Dio logging interceptor with cURL output, performance metrics, and deep error diagnostics.
Changelog #
All notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project follows Semantic Versioning.
0.3.0 - 2026-06-30 #
Added #
dio5.10 support: the newDioExceptionType.transformTimeoutgets a dedicated forensic block, andtransformis shown in the "Timeouts" summary.- Configuration presets:
DioLoggerConfig.development(),.production(), and.errorsOnly(). - Per-request opt-out: set
Options(extra: {DioLoggerInterceptor.disableLoggingKey: true})to skip all logging for a single request. - HTTP protocol version logging on responses, when the adapter reports it
(
Response.extra, dio 5.9.2+ on the IO adapter). - A "Rate Limit" section that surfaces
retry-afterandx-ratelimit-*/ratelimit-*headers on responses and errors.
Changed #
- Raised the minimum
dioconstraint to^5.10.0. - cURL generation now mirrors Dio's request transformer:
x-www-form-urlencodedbodies are URL-encoded (previously always JSON), GET bodies are included, the body honors an explicitlogRequestBody: false, and oversized bodies are omitted instead of logged in full. - Per-request state moved off
RequestOptions.extrato an internalExpando, so the logger no longer writes entries into yourextramap, and a retried request is timed fresh instead of reporting a stale duration.
Fixed #
- Security: sensitive-looking values (e.g.
Bearertokens and JWTs) are now masked in bodies and query parameters even under non-obvious keys. - Security: large non-JSON string bodies are no longer previewed unsanitized.
- Binary (
Uint8List/typed) data is no longer expanded into a number array in bodies or cURL. - Values shared across sibling branches are no longer mislabeled as
<cycle>. - A throwing custom
printercan no longer escape the interceptor and disrupt the request. - Body truncation no longer splits a surrogate pair.
0.2.0 - 2026-03-01 #
Added #
- Inlined
consts.dartandextension.dartto replacedart_helper_utilsdependency. - Visual width calculation for box-drawing alignment with emoji/wide characters.
Fixed #
- JWT-detection heuristic now requires base64url characters, reducing false positives on package names, bundle IDs, and version strings.
- Box-drawing alignment no longer breaks when titles contain emoji or wide characters.
- Error-path data-size estimation avoids expensive
jsonEncode; uses fast estimation with graceful fallback.
Changed #
- Removed
dart_helper_utilsdependency; all needed utilities are now internal. - Removed unused
httpStatusMessagesmap and dead string extension members. - Renamed internal context key to match package name.
- Redirect chain entries now use consistent
_kvformatting helper.
0.1.1 - 2026-02-28 #
- Updated
dart_helper_utilsto^6.0.0to keep dependencies current. - No API changes.
0.1.0 - 2026-02-28 #
- First stable release.
- Promoted features from
0.1.0-dev.1without API changes.
0.1.0-dev.1 - 2026-02-28 #
- Initial pre-release.
- Added
DioLoggerInterceptor,DioLoggerConfig, andDioLogLevel. - Added structured request, response, and error logging with masking.
- Added cURL generation, performance metrics, and status code guidance.
- Added request filtering and configurable output controls.
- Added package tests, example app, and CI/publishing workflows.