talker_http_logger 0.1.0-dev.21 talker_http_logger: ^0.1.0-dev.21 copied to clipboard
Lightweight and customizable http client logger on talker base
talker_http_logger #
Lightweight and customizable http client logger on talker base.
Talker - Advanced exception handling and logging for dart/flutter applications 🚀
Preview #
This is how the logs of your http requests will look in the console
Getting started #
Follow these steps to use this package
Add dependency #
dependencies:
talker_http_logger: ^0.1.0-dev.20
Usage #
Just add TalkerHttpLogger to your InterceptedClient instance and it will work
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(),
]);
await client.get("https://google.com".toUri());
}
Using with Talker #
You can add your talker instance for TalkerHttpLogger if your app already uses Talker.
In this case, all logs and errors will fall into your unified tracking system
import 'package:http_interceptor/http_interceptor.dart';
import 'package:talker_http_logger/talker_http_logger.dart';
void main() async {
final talker = Talker();
final client = InterceptedClient.build(interceptors: [
TalkerHttpLogger(talker: talker),
]);
await client.get("https://google.com".toUri());
}
Additional information #
The project is under development and ready for your pull-requests and issues 👍
Thank you for support ❤️