omni_logger 2.0.0 copy "omni_logger: ^2.0.0" to clipboard
omni_logger: ^2.0.0 copied to clipboard

Omni Logger is a production-ready logging package for Flutter with auto-configuration, file rotation, isolate support, and build mode optimization.

2.0.0 - 2026-05-28 #

Changed #

  • Replaced fragile environment variable path lookups with path_provider for cross-platform reliability
  • AppLog.setup() and OmniLoggerClient.setup() are now asynchronous and must be awaited in main.dart

Fixed #

  • Mobile startup path crashes resolved by using getApplicationSupportDirectory()
  • Wrapped directory resolution in fail-safe try/catch blocks with systemTemp fallback for all non-web platforms

Breaking Change #

  • AppLog.setup() and OmniLoggerClient.setup() must now be awaited

1.0.5 - 2026-05-11 #

Fixed #

  • Expanded description in pubspec.yaml to meet pub.dev requirements (50-180 characters)

1.0.4 - 2026-05-11 #

Fixed #

  • Actually applied device_info_plus version range >=10.1.0 <14.0.0 to resolve compatibility with amplify_analytics_pinpoint and flutter_secure_storage_windows

1.0.3 - 2026-05-11 #

Fixed #

  • Widened device_info_plus version range to >=10.1.0 <14.0.0 to resolve compatibility conflicts with amplify_analytics_pinpoint and flutter_secure_storage_windows

1.0.2 - 2026-05-11 #

Fixed #

  • Downgraded device_info_plus to ^10.1.0 to resolve win32 version conflict with flutter_secure_storage_windows

1.0.1 - 2026-05-11 #

Changed #

  • Added repository link to pubspec.yaml

1.0.0 - 2026-05-11 #

🎉 Initial Release #

Added

  • Core Logging System

    • OmniLogger interface with comprehensive logging capabilities
    • OmniLoggerClient implementation with multi-output support
    • OmniLogConfig configuration class with auto-detection of debug/profile/release modes
  • Isolate-Aware Logging

    • Automatic isolate detection and context-aware configuration
    • Specialized setup methods for different isolate types:
      • AppLog.setupForDatabaseIsolate() - Optimized for database isolates (Drift, etc.)
      • AppLog.setupForBackgroundIsolate() - Minimal logging for background tasks
    • Isolate information helpers and formatting utilities
  • File Logging Features

    • Automatic log file rotation based on size limits
    • Configurable file retention (by count and age)
    • Optional log file compression
    • Platform-aware file logging (disabled automatically on web)
  • Smart Configuration

    • Auto-configuration based on Flutter build modes:
      • Debug Mode: Full logging (debug level), file + console output
      • Profile Mode: Structured logging for performance analysis
      • Release Mode: Error-only logging, minimal file retention
    • Runtime configuration updates for log levels and file logging
    • Comprehensive logging statistics and health monitoring
  • AppLog Static Interface

    • Simple setup with AppLog.setup()
    • Direct logging with AppLog.log('ClassName').i('message') pattern
    • Specialized isolate setup:
      • AppLog.setupForDatabaseIsolate()
      • AppLog.setupForBackgroundIsolate()
    • Memory leak prevention with automatic cleanup
  • Multiple Output Support

    • Console output for development
    • File output with rotation and compression
    • JSON and production-friendly formatters
  • Developer Experience

    • Automatic fallback to console-only logging on setup failures
    • Comprehensive error handling and recovery mechanisms
    • Debug utilities for isolate information and logging statistics
    • Memory-safe logger tracking with weak references

Usage Examples

// Basic setup
AppLog.setup();
AppLog.log('MyApp').i('Application started');

// Database isolate
AppLog.setupForDatabaseIsolate(isolateName: 'drift_db');
AppLog.log('DatabaseService').d('Query executed successfully');

// Background isolate
AppLog.setupForBackgroundIsolate(isolateName: 'sync_worker');
AppLog.log('SyncService').w('Sync operation took longer than expected');

📋 Known Limitations #

  • File logging is not supported on web platform (by design)
  • Log file compression requires additional disk I/O operations
  • Initial file output creation may have slight startup delay

🔧 Configuration Notes #

  • Default log retention: 3 days (debug), 1 day (release)
  • Default file size limit: 5MB (debug), 1MB (release)
  • Console logging automatically disabled in release mode

Platform Support: ✅ Android, iOS, macOS, Windows, Linux | 🌐 Web (console only)

0
likes
160
points
306
downloads

Documentation

API reference

Publisher

verified publisherklexarolabs.com

Weekly Downloads

Omni Logger is a production-ready logging package for Flutter with auto-configuration, file rotation, isolate support, and build mode optimization.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

device_info_plus, flutter, logger, path, path_provider

More

Packages that depend on omni_logger