Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/carapacik/carapacik_dio_logger
Dio interceptor that logs in a easy to read format with curl command and colored output
https://github.com/carapacik/carapacik_dio_logger
dart dio flutter http logger logging network
Last synced: 16 days ago
JSON representation
Dio interceptor that logs in a easy to read format with curl command and colored output
- Host: GitHub
- URL: https://github.com/carapacik/carapacik_dio_logger
- Owner: Carapacik
- License: mit
- Created: 2024-06-19T10:30:37.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-19T11:50:32.000Z (8 months ago)
- Last Synced: 2024-08-22T22:34:41.359Z (6 months ago)
- Topics: dart, dio, flutter, http, logger, logging, network
- Language: Dart
- Homepage: https://pub.dev/packages/carapacik_dio_logger
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![pub version](https://img.shields.io/pub/v/carapacik_dio_logger?logo=dart)](https://pub.dev/packages/carapacik_dio_logger)
[![pub likes](https://img.shields.io/pub/likes/carapacik_dio_logger?logo=dart)](https://pub.dev/packages/carapacik_dio_logger)
[![dart style](https://img.shields.io/badge/style-carapacik__lints%20-brightgreen?logo=dart)](https://pub.dev/packages/carapacik_lints)`CarapacikDioLogger` is a [dio](https://github.com/cfug/dio) interceptor that logs in a easy to read format with curl command and colored output
## Usage
### Install
Add `CarapacikDioLogger` to your `Dio` interceptors:
```dart
final dio = Dio();dio.interceptors.add(const CarapacikDioLogger());
// or customize your interceptor
dio.interceptors.add(
const CarapacikDioLogger(
error: true,
request: true,
requestHeader: true,
requestQueryParameters: true,
requestBody: true,
response: true,
responseHeader: true,
responseBody: true,
convertFormData: true,
colorized: false,
showCurl: true,
chunkSize: 1024,
logPrint: print,
showLog: kDebugMode,
),
);
```