igloo_dio_logger 1.2.0
igloo_dio_logger: ^1.2.0 copied to clipboard
A beautiful HTTP request/response logger for Dio with ANSI colors, emojis, and advanced filtering options.
๐ 1.2.0 #
โจ New Features #
- ๐ Added
logCurl: falseโ opt-in cURL command logging after each request- Printed as a full bordered block (
โโโโ ๐ cURL โโโ...) consistent with request/response style FormDataโ--formflags per field; files use--form 'key=@"filename"'placeholder- Binary body (
Uint8List/List<int>) โ body omitted with aโ ๏ธnote: "save bytes to a file and use--data-binary '@/path'" - Unknown body type โ body omitted with a note showing the runtime type
- Single quotes are safely escaped (
'โ'\'') for valid bash syntax - Includes
-Lfor redirect following (matches Dio default behaviour) - Syntax is bash/zsh/fish; a
# bash/zsh/fishhint is shown for clarity
- Printed as a full bordered block (
- ๐
LoggerConstantsis now exported as public API โ allows access tostartTimeKeyand other constants from outside the package
๐ Bug Fixes #
- ๐
includeEndpoints/excludeEndpointsnow match against the URL path only โ anchored patterns liker'^/api'now work correctly whether a full URL or bare path is passed to Dio - ๐๏ธ
_calculateSizenow correctly computes size forFormData(sums text field bytes instead of returning"Instance of 'FormData'".length) - ๐จ๏ธ
_formatJsonnow rendersFormDataas readablekey = valuepairs instead ofInstance of 'FormData' - ๐ Request start time key namespaced to
_igloo_dio_logger_start_timeโ prevents collision with other interceptors usingoptions.extra - ๐ Separator
โin error block now usesLoggerConstants.separatorโ consistent with response block
โจ 1.1.3 #
๐ Bug Fixes #
- ๐ก๏ธ When multiple wrapper keys match in a response,
Items:is now hidden to avoid showing an ambiguous count
โจ 1.1.2 #
โจ New Features #
- ๐
Items:count now also detects common wrapper keys (data,items,results,users,posts,products,records,list,content,entries) โ works with most real-world APIs, not just plain root arrays
๐ง 1.1.1 #
๐ Bug Fixes #
- ๐งน Removed redundant
dart:typed_dataimport (already provided byflutter/foundation.dart) - ๐ฆ Tightened
diodependency constraint to^5.9.2to fix lower bound compatibility issue
๐ 1.1.0 #
โจ New Features #
- ๐ Added
Items: Nto response status line when root response is a List - ๐ข Array item closing comments now show zero-based index:
// [0],// [1], etc. - ๐ช Fixed nested array tracking โ each array depth now tracked independently via stack
๐ Bug Fixes #
- ๐ท๏ธ Fixed error response body label showing class name instead of
"Response:" - ๐ฆ Reordered
_calculateSizechecks โUint8Listnow checked beforeList<int>(more specific first)
โป๏ธ Refactoring #
- โ Explicit
dart:typed_dataimport added - ๐งน Removed unused
lineIndexvariable in JSON printer loop - โก Simplified structural token check in colorizer using
const Set - ๐๏ธ Removed unused
textItemCommentconstant
๐ 1.0.1 #
- ๐ง Fixed JSON array item comment bug (was showing
"LoggerConstants.textItemComment"instead of"// item") - ๐ Renamed file from
colored_dio_logger.darttoigloo_dio_logger.dartto match class name - ๐ Renamed test file from
colored_dio_logger_test.darttoigloo_dio_logger_test.dartfor consistency
๐ 1.0.0 #
- ๐จ Initial release
- ๐ Beautiful colored HTTP logging with ANSI colors
- ๐ Emoji status indicators for HTTP status codes
- ๐ Request/Response size tracking
- โฑ๏ธ Duration tracking
- ๐ Advanced filtering options (endpoints, errors, duration)
- ๐ฆ Pretty JSON formatting with syntax highlighting
- ๐ฏ Smart header wrapping for long values
- โก Production-safe (only logs in debug mode)