flutter_api_logger 1.1.0
flutter_api_logger: ^1.1.0 copied to clipboard
Secure API request & response logger for http and dio. Masks tokens and passwords, silent in release builds, optional cURL output. Pure Dart.
1.1.0 #
Security #
- Masking now covers JSON strings (all
httpclient bodies were previously logged unmasked), form-encoded bodies, response bodies, URL query parameters and URL credentials. - Release builds no longer log unless
enableInRelease: true. PreviouslyenableLogdefaulted totrueand nothing checked the build mode, despite the README saying otherwise. - Added
cookie,otpandcredentialto the default masked keys.
Fixed #
- Dio: concurrent requests to the same URL shared one timer and produced wrong durations; each request now carries its own id and start time.
- http: responses were decoded with
String.fromCharCodes, corrupting UTF-8 (e.g. Bangla); now decoded as UTF-8. - http: the response stream is only buffered when the body will be logged and the content type is text; binary and large downloads pass through untouched.
- Responses now show the method and URL, and status
0is shown as failed.
Added #
- Request/response ids (
#1) to correlate log blocks. showCurl,showResponseHeaders,excludeUrlPatterns,maskValue,enableInReleaseand a customoutputsink inApiLoggerConfig.FormDataand multipart summaries, byte body summaries.- Failure details (Dio exception type, http client errors).
- Tests (~97% line coverage), CI, automated publish workflow, Dependabot.
Changed #
- Pure Dart: removed the
flutterSDK and unusedrxdartdependencies. - Package topics, repository link and docs updated.
1.0.0 #
- Initial release.