A major update of the talker package has recently been released.
New release contains updated TalkerScreen with more actions and logs file sharing, fixed logs generation and etc.
😳 But another one big thing in update is talker_dio_logger package that can integrate http logs as simple as it can ever be done.
Let's take it in turns.
How it will works
talker_dio_logger is a separate package that works on the basis of talker error handler and logger package and dio most popular and powerful dart http client.
When you connect it, all information about your work on the network gets into talker's history and the console of the running application.
Get Started
Follow these steps to run talker_dio_logger in your project and see all http logs
Add dependency
dependencies:
talker_dio_logger: ^0.1.3
Usage
Just add TalkerDioLogger to your dio instance and it will work
final dio = Dio();
dio.interceptors.add(
TalkerDioLogger(
settings: const TalkerDioLoggerSettings(
printRequestHeaders: true,
printResponseHeaders: true,
),
),
);
Using with Talker
You can add your talker instance for TalkerDioLogger if your app already uses Talker.
In this case, all logs and errors will fall into your unified talker tracking system
final talker = Talker();
final dio = Dio();
dio.interceptors.add(
TalkerDioLogger(
talker: talker,
settings: const TalkerDioLoggerSettings(
printRequestHeaders: true,
printResponseHeaders: true,
),
),
);
😎 Go to the GitHub repository page!
🥵 Here you can see beautiful examples of usage and code snippets.
Show some ❤️ and star the repo to support the project!
Top comments (9)
Very nice explaination
Thank you a lot
Hi Stanislav !
I enjoy reading your posts :)
Let's connect ?
My linkedIn
Thank you !
☺️
Awesome content! ^.^;
Thank you !
very nice
Great article!! I gotta check out talker.
Thank you! You can see examples here