ispectify 4.1.3-dev12
ispectify: ^4.1.3-dev12 copied to clipboard
An additional package for ISpect (logging and handling). Based on Talker.
🔍 Overview #
ISpectify is the foundation logging system that powers the ISpect debugging toolkit.
📝 Logging • 🔍 Filtering • 📊 Monitoring • 💾 Export
ISpectify provides a robust logging foundation that integrates seamlessly with the ISpect ecosystem. Built on top of the proven Talker logging library, it offers advanced features for debugging and monitoring Flutter applications.
🎯 Key Features #
- 📝 Structured Logging: Advanced logging with categorization and filtering
- 🎨 Custom Log Types: Define your own log types with custom colors and icons
- 🔍 Real-time Filtering: Filter logs by type, level, and custom criteria
- 📊 Performance Monitoring: Track application performance metrics
- 💾 Export Functionality: Export logs for analysis and debugging
- 🔧 Easy Integration: Simple setup with minimal configuration
🔧 Configuration #
Settings #
final ispectify = ISpectify(
settings: ISpectifySettings(
enabled: true,
useConsoleLogs: true,
useHistory: true,
maxHistoryItems: 1000,
colors: {
LogLevel.info: Colors.blue,
LogLevel.warning: Colors.orange,
LogLevel.error: Colors.red,
},
),
);
Custom Log Types #
// Define custom log types
ispectify.registerLogType(
'network',
color: Colors.green,
icon: Icons.network_check,
);
// Use custom log type
ispectify.logCustom('network', 'HTTP request completed');
Performance Monitoring #
// Track performance
ispectify.trackPerformance('api_call', () async {
// Your async operation
await api.fetchData();
});
📦 Installation #
Add ispectify to your pubspec.yaml:
dependencies:
ispectify: ^4.1.3
🚀 Quick Start #
import 'package:ispectify/ispectify.dart';
void main() {
// Initialize ISpectify
final ispectify = ISpectify(
settings: ISpectifySettings(
enabled: true,
useConsoleLogs: true,
useHistory: true,
),
);
// Log different types of messages
ispectify.info('Application started');
ispectify.debug('Debug information');
ispectify.warning('Warning message');
ispectify.error('Error occurred');
// Custom log types
ispectify.log('Custom message', logLevel: LogLevel.verbose);
runApp(MyApp());
}
⚙️ Advanced Features #
Log Filtering #
// Filter logs by level
final errorLogs = ispectify.getLogsByLevel(LogLevel.error);
// Filter logs by custom criteria
final networkLogs = ispectify.getLogsByType('network');
// Search logs
final searchResults = ispectify.searchLogs('HTTP');
Export Functionality #
// Export logs to file
await ispectify.exportLogs('/path/to/logs.txt');
// Export specific log types
await ispectify.exportLogsByType('error', '/path/to/errors.txt');
📚 Examples #
See the example/ directory for usage examples and integration patterns.
🏗️ Architecture #
ISpectify serves as the logging foundation for the ISpect ecosystem:
| Component | Description |
|---|---|
| Core Logger | Based on Talker with enhanced features |
| Log Filtering | Advanced filtering and search capabilities |
| Performance Tracking | Built-in performance monitoring |
| Export System | Log export and analysis tools |
| Integration Layer | Seamless integration with ISpect toolkit |
🤝 Contributing #
Contributions are welcome! Please read our contributing guidelines and submit pull requests to the main branch.
📄 License #
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Related Packages #
- ispect - Main debugging interface
- ispectify_dio - Dio HTTP client integration
- ispectify_http - Standard HTTP client integration
- ispectify_bloc - BLoC state management integration