Skip to content
pubscout

talker_http_logger

5.2.0, released 4 weeks ago by frezycode.com

Lightweight and customizable HTTP client logger based on Talker for Dart and Flutter.

WASM-ready
$ flutter pub add talker_http_logger
Source repository

What it does

Logs HTTP requests, responses, and errors into Talker using the http_interceptor package. It supports customizing headers, printing curl commands, hiding sensitive headers, and filtering logs.

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

Use it when

  • You are using the http package with http_interceptor and want to log requests using Talker.
  • You need to print cURL commands for debugging HTTP requests.
  • You want to hide sensitive headers like Authorization or Cookie from logs.

Skip it when

  • You are using the dio package instead of http (use talker_dio_logger instead).
  • you are not using Talker for logging.

Strengths

  • Integrates seamlessly with Talker and http_interceptor.
  • Supports request cURL command generation.
  • Allows hiding sensitive headers and filtering specific logs.

Weaknesses

  • Strictly dependent on http_interceptor and Talker.
  • Limited to the http package ecosystem.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
4

Add the dependency to pubspec.yaml and pass TalkerHttpLogger into your InterceptedClient interceptors list.

import 'package:http_interceptor/http_interceptor.dart';
import 'package:talker_http_logger/talker_http_logger.dart';

void main() async {
  final client = InterceptedClient.build(interceptors: [
    TalkerHttpLogger(
      settings: const TalkerHttpLoggerSettings(
        printRequestHeaders: true,
        printResponseHeaders: true,
        printResponseMessage: true,
      ),
    ),
  ]);

  await client.get("https://google.com".toUri());
}

Alternatives

Packages that do the same job and could replace talker_http_logger.

  • http

    If you just need standard HTTP requests without Talker-based logging or interceptors.

  • dio

    If you prefer using Dio as your HTTP client instead of the basic http package.

Works with

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