Skip to content
pubscout

pretty_chopper_logger

1.3.3, released 10 months ago by an unverified publisher

Chopper interceptor that logs network calls in a pretty and readable format.

WASM-ready
$ flutter pub add pretty_chopper_logger
Source repository

What it does

Pretty Chopper logger is a Chopper interceptor designed to enhance network call logging in Dart applications. It provides visually appealing and formatted outputs for requests and responses, with support for multiple log levels, JSON pretty-printing, and customizable border widths and indentation.

AI-written summary of version 1.3.3, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are using the Chopper HTTP client in your Flutter or Dart project and need readable network logs.
  • You want to customize logging levels (headers, body, basic) and formatting for API requests and responses.

Skip it when

  • You are using a different HTTP client such as Dio or standard http package without Chopper.
  • You require advanced remote logging or crash reporting integrations rather than console formatting.

Strengths

  • Clean and readable network call logs with automatic JSON formatting.
  • Customizable log levels, max width, and indentation sizes.
  • Easy setup as a standard Chopper interceptor.

Weaknesses

  • Limited specifically to the Chopper HTTP client ecosystem.
  • Outputs only to the console (development tool).

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2

Add the package to pubspec.yaml and pass PrettyChopperLogger into your ChopperClient interceptors list.

final ChopperClient chopper = ChopperClient(
  baseUrl: Uri.parse("http://www.mocky.io/"),
  interceptors: [PrettyChopperLogger()],
  services: [
    // Add your Chopper services here
  ],
);

Alternatives

Packages that do the same job and could replace pretty_chopper_logger.

  • pretty_dio_logger

    If you are using Dio instead of Chopper for your network requests.

  • talker

    If you want a more comprehensive logging and error-handling package for Flutter applications.

Works with

Packages commonly used together with pretty_chopper_logger: ones it builds on, ones built on it, and its own family.