awesome-dio-interceptor
一個簡單的 dio 日誌攔截器(主要受到內建 dio LogInterceptor 啟發),具備色彩標記與 JSON 格式化功能,讓您獲得更易讀的輸出。
- 星標
- 22
- 分支
- 4
- 最近推送(UTC)
- 2024年11月5日
- 專案狀態
- 未封存
原始 README
以下為英文專案原文快照,最新內容請造訪 GitHub。
Awesome Dio Interceptor
A simple dio log interceptor (mainly inspired by the built-in dio LogInterceptor), which has coloring features and json formatting so you can have a better readable output.
Features
- Customizable, minimizable, and colorful output 🔥
- Json formatting 💪
- Pretty FormData support (fields & files) output ⚡️
Output Samples
The last two images have been minimized, so we can have better look at the most important logs (can be enabled and disabled, enabled by default)
Install
dependencies:
awesome_dio_interceptor: <latest_version>
Usage
Just add the AwesomeDioInterceptor to your dio interceptors like so:
dio.interceptors.add(
AwesomeDioInterceptor(
// Disabling headers and timeout would minimize the logging output.
// Optional, defaults to true
logRequestTimeout: false,
logRequestHeaders: false,
logResponseHeaders: false,
// Optional, defaults to the 'log' function in the 'dart:developer' package.
logger: debugPrint,
),
);
Medium articles by the author
You can always read the articles I write on my devmuaz account which I write pretty great flutter content out there.
Contributions & Support
Issues and pull requests are always welcome 😄
If you find this package useful for you and liked it, give it a like ❤️ and star the repo ⭐️ it would mean a lot!
License
MIT
分類
使用的依賴
如何選擇適合專案的儲存庫?
先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
- 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
- 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
- 使用前在 GitHub 確認 README、授權條款與 Issues。
來源與維護
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗