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
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.
Works with
Packages commonly used together with talker_http_logger: ones it builds on, ones built on it, and its own family.
- equatabletalker_http_logger depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- talkertalker_http_logger depends on itAdvanced error handler and logger package for Flutter and Dart apps.
- http_interceptortalker_http_logger depends on itIntercept requests and responses in Dart's http package with support for retries and timeouts.
- talker_loggerSame familyLightweight, customizable logger with filters, formatters and log levels
- talker_flutterSame familyAdvanced error handler and logger package for Flutter and Dart applications
- talker_dio_loggerSame familyA lightweight, customizable logger for Dio HTTP client built on Talker.
- talker_bloc_loggerSame familyLightweight and customizable logger for BLoC and Cubit built on Talker.
- talker_riverpod_loggerSame familyLightweight and customizable Riverpod state management logger based on Talker.