ispectify 4.2.0 copy "ispectify: ^4.2.0" to clipboard
ispectify: ^4.2.0 copied to clipboard

An additional package for ISpect (logging and handling). Based on Talker.

Foundation logging system for ISpect toolkit (based on Talker)

pub version License: MIT GitHub stars

Pub likes Pub points

🔍 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 logger = ISpectify(
    logger: ISpectifyLogger(
        settings: LoggerSettings(
      enableColors: false,
    )),
    options: ISpectifyOptions(
      enabled: true,
      useHistory: true,
      useConsoleLogs: true,
      maxHistoryItems: 10000,
      logTruncateLength: 10000,
      titles: {
        'error': 'Error Logs',
        'info': 'Info Logs',
        'debug': 'Debug Logs',
      },
      colors: {
        'error': AnsiPen()..red(),
        'info': AnsiPen()..blue(),
        'debug': AnsiPen()..white(),
      },
    ),
  );

Custom Log Types #

class CustomLog extends ISpectifyData {
  CustomLog(
    String super.message,
  ) : super(
          key: 'custom_log',
          title: 'Custom Log',
        );
}

logger.logCustom(CustomLog('This is a custom log message'));

📦 Installation #

Add ispectify to your pubspec.yaml:

dependencies:
  ispectify: ^4.1.4

🚀 Quick Start #

import 'package:flutter/material.dart';
import 'package:ispect/ispect.dart';

class CustomLog extends ISpectifyData {
  CustomLog(
    String super.message,
  ) : super(
          key: 'custom_log',
          title: 'Custom Log',
        );
}

void main() {
  // Initialize ISpectify for logging
  final ISpectify logger = ISpectify(
    logger: ISpectifyLogger(
        settings: LoggerSettings(
      enableColors: false,
    )),
    options: ISpectifyOptions(
      enabled: true,
      useHistory: true,
      useConsoleLogs: true,
      maxHistoryItems: 10000,
      logTruncateLength: 10000,
      titles: {
        'error': 'Error Logs',
        'info': 'Info Logs',
        'debug': 'Debug Logs',
      },
      colors: {
        'error': AnsiPen()..red(),
        'info': AnsiPen()..blue(),
        'debug': AnsiPen()..white(),
      },
    ),
  );

  logger.info('ISpectify initialized successfully');

  // Wrap your app with ISpect
  ISpect.run(
    () => runApp(MyApp()),
    logger: logger,
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('ISpectify Example')),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              ElevatedButton(
                onPressed: () {
                  ISpect.logger.info('Info log message');
                },
                child: const Text('Log Info'),
              ),
              ElevatedButton(
                onPressed: () {
                  ISpect.logger.logCustom(CustomLog('Custom log message'));
                },
                child: const Text('Log Custom'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

📚 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.


Built with ❤️ for the Flutter community

2
likes
160
points
2.53k
downloads

Publisher

unverified uploader

Weekly Downloads

An additional package for ISpect (logging and handling). Based on Talker.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

ansicolor, collection, web

More

Packages that depend on ispectify