π New talker feature in 2.1.0 release is filtering logs, exceptions and errors. Now I want to tell you how it works.
There can be a lot of logs in a large application. Working with network via http, local storage, controllers, exceptions, errors, verbose info, etc.
π Sometimes it becomes difficult to track something very important. And at this moment, the talker update is rushing to your aid.
βοΈ Filtering data with Talker
Let's imagine that there are a lot of logs in your application
But our interest is to see only navigation logs.
How we can make it?
Add filter to your Talker constructor, or set it by configure() method
final talker = Talker(
filter: BaseTalkerFilter(
types: [TalkerRouteLog],
),
);
final talker = Talker();
talker.configure(
filter: BaseTalkerFilter(
types: [TalkerRouteLog],
),
);
types: - log types driven by Talker package or your custom logs that you create. How I can make custom log?
But, how can I make it if I do not know what type of log is it?
Talker can do it π Use titles: filed of filter
final talker = Talker(
filter: BaseTalkerFilter(
titles: ['ROUTE'],
),
);
Result will be same as of types: [TalkerRouteLog]
Thank you for reading post!
π» Article example source code here
Show some β€οΈ and put a star on the GitHub to support the project! We are trying to make the best logs and errors manager for Flutter applications.
Top comments (9)
Hi, bro. Thanks to you! I wrote a blog in English and pulish to the internet the first time. Because I am very bad in English. I thought maybe my blog can't be saw for others. But you save my blog and follow me after I published! Oh, I was very moved. You are very kind. I will wirte more attentively in the future. Sorry, I don't know how to communicate with you. I only can leave a comment on you blog. Finally, thank you again!
Thank you !
Great article, bro, keep going
Thanks
great
Thanks
Also think of storing them remotely and making them available for access and analysis later..
Thanks for this comment! I also thinking about it.
This will be the next big thing.