chirp 0.7.0
chirp: ^0.7.0 copied to clipboard
A lightweight, flexible logging library for Dart with instance tracking, child loggers, structured logging, and span-based formatting.
0.7.0 #
New Features #
Structured logging for cloud platforms
- Add
GcpMessageFormatterfor Google Cloud Platform with automatic Error Reporting, sourceLocation, and trace correlation - Add
AwsMessageFormatterfor AWS CloudWatch with proper log level mapping - Add
JsonMessageFormatterfor platform-agnostic JSON output
Lambda-based APIs for inline customization
- Add
DelegatedChirpInterceptorfor creating interceptors inline with lambdas - Add
DelegatedChirpWriterfor creating writers inline with lambdas - Add
DelegatedConsoleMessageFormatterfor creating formatters inline with lambdas
New span types for custom formatters
- Add
DataKeyandDataValuespans for individual key/value rendering - Add
StackFrameInfo.packageRelativePathfor clean, package-relative file paths InlineDatanow supports custom separators viaentrySeparatorBuilderandkeyValueSeparatorBuilder
Other additions
- Add
LogRecord.copyWith()for easier log record manipulation in interceptors
Breaking Changes #
- Span-related exports moved from
package:chirp/chirp.darttopackage:chirp/chirp_spans.dart- Affected:
SpanBasedFormatter, all span classes (PlainText,AnsiStyled, etc.),colorForHash,ColorSaturation - Migration: Add
import 'package:chirp/chirp_spans.dart';if using custom formatters
- Affected:
Bug Fixes #
- Fix child logger not inheriting parent's
minLogLevel - Fix
Alignedspan ignoring ANSI escape codes in padding calculation - Fix
StackTraceSpanadding extra blank line due to trailing newline
Improvements #
- Remove dimmed styling from log messages without level color for better readability
Deprecations #
- Deprecate
RainbowMessageFormatter.metaWidth(no longer has any effect)
0.6.0 #
- First public release to pub.dev
- Rework of ANSI colors, now with truecolor support and detection
- Interceptors for filtering and manipulation
minLogLevelfor fast level based filtering- Optional
Stacktrace.currentcapturing
0.5.0 #
- First working prototype