crashlog 1.3.0
crashlog: ^1.3.0 copied to clipboard
A comprehensive Flutter package for capturing errors, console logs, and screenshots with cross-platform support and dev report functionality.
Changelog #
All notable changes to the Crashlog package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.3.0 - 2025-09-21 #
Enhanced Console Capture π #
- Universal Log Capture: Now captures ALL types of console output including:
- Formatted logs with box drawing characters (β, β, β, ββββ)
- Logs with emojis (π, π‘, β) from custom loggers/interceptors
- BLoC state change logs automatically
- HTTP interceptor logs with proper categorization
- Native Android/iOS logs (
I/flutter
) - Flutter framework warnings (
[log] ...
) - Custom logger output from any logging framework
Improved #
- Early Capture: Automatic zone setup captures logs from app startup
- Smart Parsing: Intelligent log level detection based on content and emojis
- Zero Configuration: No code changes needed - just initialize once
- Enhanced Documentation: Added comprehensive console capture guide
Added #
- CONSOLE_CAPTURE_GUIDE.md: Detailed guide for troubleshooting console log capture
- Enhanced Example: Updated example app with test cases matching real-world log formats
- Automatic Initialization: Zone-based capture is set up automatically during
Crashlog.init()
1.2.0 - 2025-09-21 #
Fixed #
- Critical Dependency Fix: Resolved dependency version conflicts with user projects
- Enhanced Constraints: Further widened version ranges to prevent conflicts
share_plus
: Now supports^6.0.0 <20.0.0
for maximum compatibilitydevice_info_plus
: Now supports^8.0.0 <20.0.0
for maximum compatibilitypackage_info_plus
: Now supports^2.0.0 <15.0.0
for maximum compatibilitypath_provider
: Now supports^2.0.0 <5.0.0
for maximum compatibilityscreenshot
: Now supports^2.0.0 <5.0.0
for maximum compatibilityjson_annotation
: Now supports^4.0.0 <6.0.0
for maximum compatibility
Improved #
- Pub.dev Score: Optimized for perfect pub.flutter-io.cn score with latest dependency support
- Compatibility: Now compatible with the latest versions of all major dependencies
1.1.0 - 2025-09-20 #
Added #
- Automatic debugPrint Capture: All
debugPrint()
statements are now automatically captured without any code changes - Logger Package Integration: Easy integration with popular logging packages like
logger
,dio
, and others - LoggerWrapper: Drop-in replacement logger that automatically captures all logs
- External Log Capture: Manual methods to capture logs from any logging framework
- Extension Methods: Easy logging using
.logTocrashlog()
on any object - Zone-based Print Capture: Captures all print statements using Dart zones
- Flexible Dependency Constraints: Widened version ranges for all dependencies to prevent conflicts with user projects
share_plus
: Now supports^6.0.0 <15.0.0
(was^7.2.1
)device_info_plus
: Now supports^8.0.0 <15.0.0
(was^9.1.0
)package_info_plus
: Now supports^2.0.0 <10.0.0
(was^4.2.0
)path_provider
: Now supports^2.0.0 <4.0.0
(was^2.1.1
)screenshot
: Now supports^2.0.0 <4.0.0
(was^2.1.0
)
Improved #
- Zero Code Changes Required: Developers now only need to call
Crashlog.init()
once - everything else is automatic - Better Integration: No need to manually wrap exceptions or replace existing debug prints
- Enhanced Documentation: Added comprehensive integration examples for popular logging packages
- Universal Logging Support: Can capture logs from any logging framework with simple integration
1.0.0 - 2025-09-20 #
This is the initial stable release of the Crashlog package with full cross-platform support and comprehensive feature set.
Added #
- Initial release of Crashlog package
- Error Capture: Automatic capture of uncaught Flutter and Dart errors
- Console Logging: Capture and store all console output including
print()
,debugPrint()
- Screenshot Capture: Optional screenshot capture when errors occur (cross-platform)
- Dev Report Screen: Comprehensive UI for viewing, managing, and sharing logs
- Cross-Platform Support: Works on Android, iOS, Windows, macOS, Linux, and Web
- Automatic Cleanup: Configurable retention policies for logs and screenshots
- Non-Blocking Operations: All operations are asynchronous and won't block the app
- Storage Service: Local file storage with JSON format for logs
- Multiple Button Types: Various UI components for accessing dev reports
ErrorRecorderButton
: Floating action buttonErrorRecorderIconButton
: App bar icon buttonErrorRecorderInlineButton
: Inline buttonErrorRecorderOverlayButton
: Draggable overlay button
- ErrorRecorderWrapper: Widget wrapper for screenshot capture functionality
- Device Information: Automatic collection of device and app information
- Sharing Capabilities: Share logs individually or combined via platform sharing
- Customizable Configuration: Extensive configuration options
- Example App: Comprehensive example demonstrating all features
Features #
- Error log capture with stack traces, timestamps, and device info
- Console log capture with different log levels (info, warning, error, debug, custom)
- Screenshot capture on error (when enabled)
- Local storage with configurable file names and directories
- Automatic cleanup based on maximum log count and retention days
- Dev Report screen with tabbed interface for error logs and console logs
- Expandable error details with stack trace viewing
- Screenshot viewing in full-screen dialog
- Log sharing functionality (text format)
- Clear logs functionality with confirmation dialogs
- Cross-platform compatibility with graceful degradation
- Non-blocking asynchronous operations
- Memory and storage efficient with automatic cleanup
Configuration Options #
enabled
: Enable/disable package functionalityenableScreenshots
: Capture screenshots on errorsautoOpenOnError
: Automatically open dev report when errors occurmaxLogs
: Maximum number of error logs to retain (default: 50)maxConsoleLogs
: Maximum number of console logs to retain (default: 1000)logRetentionDays
: Delete logs older than specified daysshowDeviceInfo
: Include device information in error logslogFileName
: Custom error log file nameconsoleLogFileName
: Custom console log file namescreenshotFolder
: Custom screenshot folder name
Platform Support #
- β Android: Full feature support
- β iOS: Full feature support
- β Windows: Full feature support
- β macOS: Full feature support
- β Linux: Full feature support
- β Web: Partial support (no screenshots due to browser limitations)
Technical Details #
- Built with Flutter SDK >=3.0.0
- Dart SDK >=3.0.0 <4.0.0
- Dependencies:
path_provider
: Local file storagedevice_info_plus
: Device information collectionpackage_info_plus
: App information collectionscreenshot
: Screenshot capture functionalityshare_plus
: Platform sharing capabilitiesjson_annotation
: JSON serialization
Documentation #
- Comprehensive README with usage examples
- Inline code documentation
- Example app with various use cases
- Platform-specific implementation notes
Known Limitations #
- Web platform doesn't support screenshot capture due to browser security limitations
- Global
print()
function override has limitations in Dart - Screenshot capture requires widget wrapping for optimal functionality
Future Roadmap #
- Remote log uploading capabilities
- Advanced filtering and search in dev report
- Log export in multiple formats (JSON, CSV, etc.)
- Integration with popular logging frameworks
- Performance metrics collection
- Crash analytics and reporting
- Custom log formatting options
- Plugin architecture for extensibility