app_logger_manager 2.0.0
app_logger_manager: ^2.0.0 copied to clipboard
A comprehensive Flutter app log manager package for your app.
Changelog #
All notable changes to the App Log Manager package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
2.0.0 - 2025-07-29 #
β οΈ Breaking Changes #
-
Simplified Logging API: Streamlined logging methods to improve usability and performance
- Removed optional parameters (
tag
,context
,source
,method
,lineNumber
) from basic logging methods (debug
,info
,warning
,error
,fatal
,verbose
) - These parameters are now handled internally or through specialized logging methods
- This change makes the basic logging API cleaner and more intuitive
- Removed optional parameters (
-
LogEntry Model Simplification: Reduced complexity of the
LogEntry
model- Removed fields:
context
,source
,method
,lineNumber
- Kept essential fields:
level
,message
,timestamp
,tag
,error
,stackTrace
,userId
,sessionId
,correlationId
- This change improves performance and reduces memory usage
- Removed fields:
β¨ Enhanced #
-
Dependency Updates: Updated to latest stable versions for better performance and security
flutter_shared_utilities
: Updated from ^1.0.4 to ^1.0.14logger
: Updated from ^2.5.0 to ^2.6.1custom_lint
: Updated from ^0.7.5 to ^0.8.0flutter_custom_lints
: Updated from ^1.0.3 to ^1.0.18
-
Example App Improvements: Updated example application to showcase the simplified API
- Improved log stream viewer widget performance
- Better demonstration of new simplified logging methods
- Enhanced UI for testing different logging scenarios
π οΈ Technical Improvements #
- API Clarity: More focused and easier-to-use logging interface
- Performance Optimizations: Reduced overhead from simplified models and methods
- Better Documentation: Updated documentation to reflect the new simplified API
- Improved Maintenance: Cleaner codebase with reduced complexity
π Migration Guide #
To migrate from v1.x to v2.0.0:
-
Update logging calls: Remove extra parameters from basic logging methods
// Before (v1.x) logger.info('Message', tag: 'MyTag', context: {'key': 'value'}); // After (v2.0.0) logger.info('Message');
-
Use specialized methods: For advanced logging with context, use specialized methods
// For user actions logger.logUserAction('button_click', screen: 'home', parameters: {'id': '123'}); // For API calls logger.logApiCall('GET', '/api/users', statusCode: 200);
-
LogEntry construction: Remove deprecated fields when creating custom LogEntry instances
// Before (v1.x) LogEntry(level: LogLevel.info, message: 'Test', context: {...}, source: 'file.dart'); // After (v2.0.0) LogEntry(level: LogLevel.info, message: 'Test', tag: 'MyTag');
1.0.2 - 2025-06-22 #
- Fix linter problems
- Add additional public API documentations
1.0.1 - 2025-06-22 #
- Fix app logger import from flutter_shared_utilities package
1.0.0 - 2025-06-22 #
π Initial Release #
The first stable release of App Log Manager - a comprehensive Flutter logging package with advanced features for production applications.
β¨ Added #
Core Logging Features
- Complete Log Level System: 8 log levels (none, fatal, error, warning, info, debug, verbose, all) with priority-based filtering
- Structured Logging: Rich
LogEntry
model with context, tags, metadata, and source tracking - Real-time Log Streaming: Stream-based architecture for live log monitoring and UI updates
- Context Tracking: Built-in support for user ID, session ID, and correlation ID tracking
- Source Code Tracking: Automatic capture of source file, method name, and line number
Advanced Logging Capabilities
- Performance Monitoring:
logPerformance()
method for timing operations and performance metrics - API Call Logging:
logApiCall()
with comprehensive HTTP request/response tracking - User Action Tracking:
logUserAction()
andlogFeatureUsage()
for user behavior analytics - Security Event Logging:
logSecurity()
for security-focused event tracking - Business Event Analytics:
logBusinessEvent()
for custom business metrics and KPIs - Crash Reporting:
logCrash()
with automatic Flutter and platform error handling - Navigation Logging:
logNavigation()
for route changes and user flow tracking
Developer Experience
- Interface-based Architecture:
AppLogger
abstract interface for dependency inversion - Factory Pattern:
LogManagerFactory
with 8+ pre-configured logger instances:createDefault()
- Basic logger with console outputcreateDevelopmentLogger()
- Verbose development loggingcreateProductionLogger()
- File-based production loggingcreateConsoleLogger()
- Console-only outputcreateFileLogger()
- File-based persistent loggingcreateTestLogger()
- In-memory testing loggercreateApiLogger()
- API monitoring specialized loggercreatePerformanceLogger()
- Performance monitoring loggercreateSecurityLogger()
- Security-focused logging
- Type Safety: Built with null safety and safe type conversion methods
- Rich Formatting: Emoji icons, ANSI colors, and customizable log formatters
Storage and Persistence
- Multiple Storage Backends: Console output, file logging, and custom storage implementations
- File Logging: Persistent file-based logging with configurable paths
- In-Memory Storage: Fast in-memory storage for testing and development
- Custom Storage Interface:
LogStorage
interface for implementing custom backends - Log Retrieval: Query logs by count, level, tag, and date range
- Export Functionality: JSON export capabilities for log sharing and analysis
Production Features
- Environment Configurations: Optimized presets for development, production, and testing
- Log Sanitization: Automatic removal of sensitive data (passwords, emails, credit cards, phone numbers)
- Memory Management: Configurable log retention limits and automatic cleanup
- Performance Optimized: Efficient logging with minimal performance impact
- Error Handling: Comprehensive error handling with graceful degradation
Models and Utilities
- LogLevel Enum: Complete log level enumeration with priorities, labels, and utilities
- LogEntry Model: Comprehensive log entry model extending
BaseDataModel
- Log Formatters: Utility class for formatting durations, bytes, and objects
- Custom Log Printer: Enhanced log printer with emoji icons and better formatting
Example Application
- Comprehensive Demo App: Full-featured example app demonstrating all logging capabilities
- Interactive UI: Live log streaming viewer and interactive demo controls
- Real-world Examples: Practical examples of logging in different scenarios
- Clean Architecture: Example follows Flutter best practices and clean architecture
π οΈ Technical Details #
Dependencies
flutter
: SDK dependency for Flutter framework integrationflutter_shared_utilities: ^1.0.3
: Utilities for base data models and common functionalitylogger: ^2.5.0
: Enhanced console logging capabilities
Development Dependencies
flutter_test
: Testing framework for comprehensive test coveragecustom_lint: ^0.7.5
: Custom linting rules for code qualityflutter_custom_lints: ^1.0.3
: Flutter-specific linting rules
Platform Support
- β iOS: Full support for iOS applications
- β Android: Full support for Android applications
- β Web: Full support for Flutter web applications
- β macOS: Full support for macOS desktop applications
- β Windows: Full support for Windows desktop applications
- β Linux: Full support for Linux desktop applications
Dart/Flutter Requirements
- Dart: >= 3.8.1
- Flutter: >= 3.8.1
- Full null safety support
- Compatible with latest Flutter stable releases
π Documentation #
- Comprehensive README with usage examples and API documentation
- Complete API documentation with detailed method descriptions
- Example app with practical implementation patterns
- Inline code documentation following Dart documentation standards
π§ͺ Testing #
- Unit tests for core logging functionality
- Widget tests for UI components in example app
- Integration tests for end-to-end logging workflows
- Mock implementations for testing custom storage backends
π Security #
- Built-in data sanitization for sensitive information
- Secure file logging with appropriate permissions
- No data collection or transmission to external services
- Privacy-focused design with local-only logging by default
[Unreleased] #
π Coming Soon #
- Remote logging capabilities with secure transmission
- Log aggregation and centralized logging server support
- Advanced filtering and search capabilities
- Performance dashboard and analytics
- Integration with popular monitoring services
- Custom log level definitions
- Batch logging for high-performance scenarios
- Log compression and archiving features
Note: This changelog follows Keep a Changelog format. For detailed technical changes, see the GitHub commit history.
Legend #
- π Major releases and milestones
- β¨ New features and enhancements
- π οΈ Technical improvements and changes
- π§ Configuration and setup changes
- π Bug fixes and corrections
- π Documentation updates
- π§ͺ Testing improvements
- π Security enhancements
- β οΈ Deprecations and breaking changes
- π Future plans and roadmap items