talker_dio_logger
v4.9.3Lightweight and customizable dio http client logger on talker base
Package archive: https://pubdev.letsnova.ru/api/archives/talker_dio_logger/4.9.3.tar.gz
dart pub add talker_dio_loggerReadme
talker_dio_logger
Lightweight and customizable dio 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

For better understanding how it works check Web Demo page
Getting started
Follow these steps to use this package
Add dependency
dependencies:
talker_dio_logger: ^4.9.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,
printResponseMessage: true,
),
),
);
Customization
To provide hight usage exp here are a lot of settings and customization fields in TalkerDioLoggerSettings. You can setup all wat you want. For example:
Off/on http request or reposnse logs
You can toggle reponse / request printing and headers including
final dio = Dio();
dio.interceptors.add(
TalkerDioLogger(
settings: const TalkerDioLoggerSettings(
// All http responses enabled for console logging
printResponseData: true,
// All http requests disabled for console logging
printRequestData: false,
// Reposnse logs including http - headers
printResponseHeaders: true,
// Request logs without http - headersa
printRequestHeaders: false,
),
),
);
Change http logs colors
Setup your custom http-log colors. You can set color for requests, responses and errors in TalkerDioLoggerSettings
TalkerDioLoggerSettings(
// Blue http requests logs in console
requestPen: AnsiPen()..blue(),
// Green http responses logs in console
responsePen: AnsiPen()..green(),
// Error http logs in console
errorPen: AnsiPen()..red(),
);
Filter http logs
For example if your app has a private functionality and you don't need to store this functionality logs in talker - you can use filters
TalkerDioLoggerSettings(
// All http request without "/secure" in path will be printed in console
requestFilter: (RequestOptions options) => !options.path.contains('/secure'),
// All http responses with status codes different than 301 will be printed in console
responseFilter: (response) => response.statusCode != 301,
)
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 tracking system
final talker = Talker();
final dio = Dio();
dio.interceptors.add(TalkerDioLogger(talker: talker));
Additional information
The project is under development and ready for your pull-requests and issues 👍
Thank you for support ❤️
Changelog
4.9.3
- [talker] chore(deps): update dependency gradle to v8.14.3 [talker] chore(deps): update plugin com.android.application to v8.11.1
Thanks to renovate
4.9.2
- [talker_dio_logger] Add response data converter
responseDataConverterfield forTalkerDioLoggerSettings
Thanks to zhengbomo
4.9.1
- [talker_http_logger] chore(deps): update plugin org.jetbrains.kotlin.android to v2
- [talker_http_logger] chore(deps): update plugin com.android.application to v8.10.1
Thanks to renovate
4.9.0
- [talker_flutter] chore: update share_plus to v11.0.0
Thanks to jeroenbell
4.8.4
- [talker_riverpod_logger] add family arguments to the logs
Thanks to lucavenir
4.8.3
- [talker_riverpod_logger] add an error filter
Thanks to lucavenir
4.8.2
- [talker] Add
CustomLogDocumentation - [example] Update plugin com.android.application to v8.10.1
- [example] Update dependency gradle to v8.14.1
Thanks to MeyerOppelt
4.8.1
- [talker_dio_logger] Add logging of request`s extra
Thanks to lucavenir
4.8.0
- [talker_flutter] Add custom settings section
Thanks to zvikarp
4.7.9
- [talker_bloc_logger] show full data of Bloc logs in Flutter Talker
Thanks to Mooyeee
4.7.8
- [talker_flutter] fix: respect custom TalkerLogger output in TalkerFlutter.init
Thanks to techouse
4.7.7
- [talker_logger] chore: update logger output type for improved clarity
Thanks to techouse
4.7.6
- [talker_flutter] fix: propagate
itemsBuildertoTalkerView
Thanks to AhmedEzio47
4.7.5
- Update example application dependencies
Thanks to apps/renovate
4.7.4
- [talker_dio_logger] Add logLevel field to provide in all dIo logs
Thanks to mylukin
4.7.3
- [talker_flutter] Fixed missing info and detailed message for exceptions
Thanks to salarshad
4.7.2
- [talker_dio_logger] Add response time to logs
- Add
printResponseTimefield forTalkerDioLoggerSettingsto turn on/off response time printing
Thanks to troyanskiy
4.7.1
- [talker_flutter] Fix scroll issue and widget usability with high text scale
Thanks to federicoviceconti
4.7.0
- [talker_flutter] Remove deprecated dart:html
- [talker_logger] Remove deprecated dart:html
Thanks to Mooyeee
4.6.14
- [talker] Fix search filtering rules
Nowtitles && types && searchQueryreplacetitles || types || searchQuerylogic
Thanks to N1X41
4.6.13
- [talker_dio_logger] Fix
hiddenHeadersalters the request headers
Thanks to amrgetment
4.6.12
- [talker_flutter] Rename conflict extension
firstWhereOrNullfromcollection
Thanks to Bogdan778
4.6.11
- [talker_dio_logger] Add
printResponseRedirectsfield intoTalkerDioLoggerSettingsto print Response redirects
Thanks to federicoviceconti
4.6.10
- [talker_flutter] Fix search textfield background color become white in light theme
Thanks to asadman1523
4.6.9
- [talker] Fix CustomLogs
penfield ignoring by console issue#313
4.6.8
- [talker_dio_logger] Fix substitution of hidden headers
hiddenHeadersfield inTalkerDioLoggerSettings
4.6.7
- [talker_http_logger] Add settings
TalkerLoggerSettingsfield to setup http logger settings - [talker_http_logger] Add
hiddenHeadersfield inTalkerLoggerSettingsto hide specific and sensitive http logger headers
Thanks to Ilushnik
4.6.6
- [talker_dio_logger] Add
hiddenHeadersfield inTalkerDioLoggerSettingsto hide specific and sensitive dio logger headers
Thanks to Ilushnik
4.6.5
- [talker_bloc_logger] Bump bloc version to 9.0.0
4.6.4
- [talker_flutter] Proper migration of support to the web using both html and wasm
- [talker_flutter] Update example dart sdk version to '>=3.6.0 <4.0.0'
Thanks to yelmuratoff
4.6.3
- [talker_flutter] Correction the import file name in the talker_flutter log downloader web
Thanks to samanzamani
4.6.2
- [talker_flutter] Migrate downloadLogs export to new js_interop package
4.6.1
- [talker_flutter] Add new web api support for download logs file
4.6.0
- [talker_flutter] Add support WASM for Flutter Web
- [talker_flutter] Support flutter 3.27, remove deprecations
Thanks to abdelaziz-mahdy
4.5.6
- [talker_flutter] Add copy functionality for filtered logs
Thanks to abdelaziz-mahdy
4.5.5
- [talker] Add history logging filter by LogLevel
- [talker_flutter] Fix TalkerScreen does not respect configured LogLevel setting
Thanks to mylukin
4.5.4
- [talker_flutter] Add isLogsExpanded and isLogOrderReversed flags to TalkerScreen widget
Thanks to Ilushnik
4.5.3
- [talker_http_logger] Add HttpErrorLog for wrong http statuses
Thanks to yelmuratoff
4.5.2
- [talker_flutter] Add fallback Flutter screen log card color by LogLevel
4.5.1
- [talker_flutter] Fix mapping LogColors to Flutter Color (Logs screen)
4.5.0
More Flexible Interaction with Custom Logs
- BREAKING [talker] Change the type of
colorsparameter in theTalkerSettingsclass fromMap<TalkerLogType, AnsiPen>?toMap<String, AnsiPen>?. Custom colors must now use a string key for log types. - BREAKING [talker] Change the type of
titlesparameter in theTalkerSettingsclass fromMap<TalkerLogType, String>?toMap<String, String>?. Custom titles must now use a string key for log types. - BREAKING [talker_flutter] Change the type of
colorsparameter in the TalkerScreenTheme class fromMap<TalkerLogType, Colors>?toMap<String, Colors>?. Custom colors must now use a string key for log types. - [talker] Add new tests and updated existing ones.
- [talker] Update the documentation for log customization.
Thanks to yelmuratoff
4.4.7
- [talker_dio_logger] Make encoder constant private
4.4.6
- [talker] Reanme logTyped method to logCustom
- [talker] Add Deprecated annotation for logTyped method
4.4.5
- [talker_logger] Add enable option field to control log output (on talker_logger level)
Thanks to weitsai
4.4.4
- [talker_dio_logger] Add enable option field to control log output (on talker_dio_logger level)
Thanks to weitsai
4.4.3
- [talker_http_logger] Bump http_interceptor package version to 2.0.0
4.4.2
- [talker] Fix provide pen color field in log() method
- [talker] Android dependecies actualization and bug fixing in example app code
Thanks to HE-LU and venkat9507
4.4.1
- [talker_flutter] Bump share_plus version to 10.0.1
- [talker_flutter] Bump path_provider version to 2.1.4
4.4.0
- [talker] Stable
TimeFormatrelease (Support of custom time formatting for every talker package) - [talker_riverpod_logger] Bump version to talker common versions system
4.3.5
- [talker_bloc_logger] Setup common time format from talker settings for Bloc logs
4.3.4
- [talker_riverpod_logger] Duplicated state logs fixes
Thanks to ArinFaraj
4.3.3
- [talker_bloc_logger] Fix bloc logs TimeFormat
Thanks to Mooyeee
4.3.2
- [talker_riverpod_logger] Fix issue with display time inside riverpod package
Thanks to yelmuratoff
4.3.1
- [talker_flutter] Fix showing times on FlutterScreen cards
Thanks to fieldOfView
4.3.0
- [talker_flutter] Custom logs timestamp formattings
Thanks to abdelaziz-mahdy
4.2.4
- [talker_riverpod_logger] Print missing data on TalkerScreen
Thanks to yelmuratoff
4.2.3
- [talker_riverpod_logger] Include Provider's name in logs output
Thanks to KoheiKanagu
4.2.2
- [talker_flutter] Support for Flutter 3.22, fix new version deprecations
4.2.1
- [talker_dio_logger] Add missing error setting for TalkerDioLoggerSettings:
printErrorDataprintErrorHeadersprintErrorMessageerrorFilter
Thanks to Ali1Ammar
4.2.0
- Initial release of talker_riverpod_logger
Thanks to jbdujardin
4.1.5
- [talker_flutter] Bump share_plus version to 9.0.0
4.1.4
- [talker_logger] Fix default logs printing method
4.1.3
- [talker_flutter] Bump share_plus version to 8.0.2
- [talker_flutter] Bump path_provider version to 2.1.2
4.1.2
- [talker_flutter] Bump group_button version to 5.3.4
4.1.1
- Fix TalkerLog.generateTextMessage exception info missing
Thanks to heiha100
4.1.0
- Fix Exception and StackTrace is ignored for logs
- Fix typo at the beginning README.md
- Fix TalkerScreen log type selector text colors
4.0.3
- Support web for talker and talker_logger
- Update talker_bloc_logger README.md
Thanks to melodysdreamj and MiladAtef
4.0.2
- Fix inconsistent colors at TalkerScreen
- Add LogColors typedef in TalkerTheme
(Map<TalkerLogType, Color>)
Thanks to XanderD99
4.0.1
- Fix talker configure method problems issue #186
Thanks to K1yoshiSho
4.0.0
-
Add ability to customize colors and titles of any Talker logs
-
Add ability to customize colors of any logs in TalkerScreen UI
-
Add TalkerLogType enum for clear differentiation of logs by types.
-
Update TalkerScreen UI (The interface is now even more user-friendly)
-
Huge documentation update
-
Make 100% test coverage of talker_bloc_logger and talker_dio_logger
-
Add expand / collapse ability for one log card
-
Packages versions synchronization (Now the versions of all core libraries will be identical)
-
BREAKING TalkerDataInterface deleted (Now base data class is TalkerData)
-
Fix: Text color not always visible issue #174
-
Add custom title format issue #170
-
Fix: Logger not resets log color issue #86
Check more details in documentation
4.0.0-dev.6
- Make 100% tests coverage
- Update example UI
- Add custom log titles documentation
- Fix TalkerScreen log colors setup
- Fix TalkerScreenTheme textColor providing
4.0.0-dev.5
- Huge documentation update
- Update talker_flutter styles
- Add expand / collapse ability for one log card
- Add colors customization examples
4.0.0-dev.4
- Add new tests to make 100% coverage
- Fix linter issues
4.0.0-dev.3
- Update talker_logger settings setup method
4.0.0-dev.2
- Fix types and remove unused code
4.0.0-dev.1
- First version with Logs keys implementation
- BREAKING TalkerDataInterface deleted
- Add new talker colors customization
2.4.0
- Update talker version to 3.2.0
- Add ability to setup custom history implementation
- Add abstract class TalkerHistory
- Add DefaultTalkerHistory implementation with basic (previous) functionality by default
Thanks to Ppito
2.3.4
- Update talker version to 3.1.7
2.3.3
- Update talker version to 3.1.6
2.3.2
- Update talker version to 3.1.5
2.3.1
- Update talker version to 3.1.4
2.3.0
- Update talker version to 3.1.0
2.2.3
- Update talker version to 3.0.4
2.2.2
- Add topics in pubspec.yaml
- Update talker version to 3.0.2
2.2.1
- Fix Response headers bug
Thnaks for matt400m
2.2.0
- Add responseFilter and requestFilter in TalkerDioLoggerSettings Now you can add your custom logic to log only specific HTTP responses and resuests
2.1.2
- Fix linter issues
2.1.1
- Downgrade lints package to 2.0.0 version
- Update analysis options
2.1.0
- Rename HttpRequestLog -> DioRequestLog
- Rename HttpResponseLog -> DioResponseLog
- Rename HttpErrorLog -> DioErrorLog
2.0.2
- Replace deprecated DioError with DioException
- Update sdk version to '>=2.15.0 <4.0.0'
2.0.1
- Upgrade dio version to 5.2.0
2.0.0
- Upgrade talker version to 3.0.0
- Fix Addon currently exist issue
- Remove addon functionality to simplify code base
2.0.0-dev.2
- Upgrade talker version to 3.0.0-dev.13
2.0.0-dev.1
- Upgrade talker to 3.0.0-dev.4 version
- Make titles well known (WellKnownTitles.httpRequest.title, WellKnownTitles.httpResponse.title, WellKnownTitles.httpError.title)
1.3.0
- FEAT: Update talker_dio_logger dio version to 5.0.0
1.2.2
- FEAT: Add addonId field for create a lot of addon instances in talker
1.2.1
- FEAT: Tmp fix for conver json method exception for FormData
1.2.0
- FEAT: Update talker version to 2.4.0
- FEAT: Setup internal talker addon registration
- FEAT: Add settings in talker_flutter settings
1.1.0
- FEAT: Add configure method to update [settings] of [TalkerDioLogger]
1.0.3
- FIX: Update talker version to 2.3.3
1.0.2
- FIX: Fix format
1.0.1
- FIX: Fix color override in dio logger
- FIX: Fix color reset in console
Thnaks for westito
1.0.0
- BREAKING: Package available for dart applications as for Flutter apps (Flutter sdk was removed from package dependencies)
- FEAT: Upgrade logs formatting, more readable, simpler and more effective
- FEAT: Implement DioError custom logs with new formatting
0.6.0
- FEAT: Implement requestPen and responsePen for setup custom request and response console message colors
0.5.0
- Talker mutual update See more in releases
0.4.0
- FEAT: Implement Response.statusMessage printing
- FEAT: Implement printResponseMessage field in TalkerDioLoggerSettings
0.3.0
- FIX: Delete stackTrace for dio errors
0.2.0
- FIX: Add try/catch for interceptor to avoid FormData exceptions
0.1.3
- FEAT: Update talker_flutter version to 2.0.3
0.1.2
- FEAT: Update talker_flutter version to 2.0.2
0.1.1
- FEAT: Update talker_flutter version to 2.0.1
0.1.0
- Huge Talker update See more in releases
0.1.0-dev.6
- FEAT: Downgrade min supported sdk version from 2.18 to 2.15
0.1.0-dev.5
- FEAT: provide documentation and usage examples
0.1.0-dev.4
- FIX: null status code showing
0.1.0-dev.3
- FEAT: Implement example Flutter app
- FIX: empty data and headers prints
0.1.0-dev.2
- FEAT: Fix print only not empty data and headers
0.1.0-dev.1
Initial release with base TalkerDioLogger implementation
