ispectify 4.1.3-dev13
ispectify: ^4.1.3-dev13 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-dev13
π 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