dio_pretty_logger 2.0.0 copy "dio_pretty_logger: ^2.0.0" to clipboard
dio_pretty_logger: ^2.0.0 copied to clipboard

A pretty-printing Dio interceptor for debugging HTTP requests and responses.

2.0.0 #

Breaking change — complete API redesign.

  • DioPrettyLogger is now a proper Interceptor subclass. Add it directly: dio.interceptors.add(DioPrettyLogger()).
  • All configuration is now passed via constructor parameters instead of static mutable fields, making it safe to use multiple loggers with different settings.
  • Removed the global prettyInterceptorsWrapper variable.
  • Bug fix: onResponse now forwards the full Response object to handler.next (previously it incorrectly passed only response.data, breaking downstream interceptors).
  • Bug fix: error response body is now printed correctly in onError.
  • Bug fix: maxListPrintLength is now respected (previously hardcoded to 2).
  • Bug fix: removed the always-true i >= 0 condition in _printBlock.
  • Added JSON string auto-detection — string bodies that contain valid JSON are decoded and pretty-printed.
  • Fixed typo: kDioLogenableenabled.
  • Renamed showErrorMsgshowError.
  • Updated flutter constraint to >=3.27.0 (Flutter 3.44-compatible).
  • Added dio: ^5.0.0 version constraint.
  • Expanded test suite (request, response, error, truncation, disabled state).

1.0.4 #

  • prettyMap design alter

1.0.3 #

  • onRequest parameter added

1.0.2 #

  • onRequest method parameter added

1.0.1 #

  • Initial release.
0
likes
150
points
117
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A pretty-printing Dio interceptor for debugging HTTP requests and responses.

Repository (GitHub)
View/report issues

Topics

#dio #logging #pretty #interceptor #networking

License

MIT (license)

Dependencies

dio, flutter

More

Packages that depend on dio_pretty_logger