igloo_http_logger 1.1.0
igloo_http_logger: ^1.1.0 copied to clipboard
A beautiful HTTP request/response logger for the http package with ANSI colors, emojis, and advanced filtering options.
🔗 1.1.0 #
✨ New Features #
- 🔗 Added
logCurl: false— opt-in cURL command logging after each request- Printed as a full bordered block (
╔═══ 🔗 cURL ═══...) consistent with request/response style - Includes
-Lfor redirect following http.Request→-d '...'with JSON compaction and single-quote escapinghttp.MultipartRequest→--formflags per field; files use--form 'key=@"filename"'placeholderhttp.StreamedRequest→ body omitted with a⚠️note: "body bytes not available at log time"- Single quotes in body are safely escaped (
'→'\'') for valid bash syntax - Syntax is bash/zsh/fish; a
# bash/zsh/fishcomment is shown for clarity
- Printed as a full bordered block (
- 🌍
LoggerConstantsis now exported as public API — allows access to regex patterns and other constants from outside the package
🐛 Bug Fixes #
- 🔀 Separator
│in error block now usesLoggerConstants.separator— consistent with response block - ♻️ Inline regex patterns in
_json_formatter.dartreplaced withLoggerConstants.reOpenBrace,reKeyValue,reNumber— compiled once asstatic final
🔧 1.0.1 #
📝 Documentation #
- Updated
igloo_dio_loggerreference from "sister package" to "companion package" in README
🎉 1.0.0 #
- 🎨 Initial release
- 🌈 Beautiful colored HTTP logging with ANSI colors
- 😀 Emoji status indicators for HTTP status codes
- 📊 Request/Response size tracking
- ⏱️ Duration tracking
- 🔢 Array item annotations — items labeled
// [0],// [1], etc. - 📋
Items:count in status line — detects root List responses and common wrapper keys (data,items,results,users,posts,products,records,list,content,entries) - 🛡️ When multiple wrapper keys match,
Items:is hidden to avoid showing an ambiguous count - 🔍 Advanced filtering options (endpoints, errors, slow requests)
- 📦 Pretty JSON formatting with syntax highlighting
- 🎯 Smart header wrapping for long values (e.g. JWT tokens)
- ⚡ Production-safe (only logs in debug mode)