voo_logging library

A zero-config, production-ready logging package for Flutter.

Quick Start

import 'package:voo_logging/voo_logging.dart';

// Just use it - no initialization required!
VooLogger.info('Hello world');
VooLogger.debug('Debug message');
VooLogger.warning('Warning message');
VooLogger.error('Error occurred', error: e);

Structured Logging

VooLogger.info(
  'User logged in',
  category: 'Auth',
  tag: 'login',
  metadata: {'userId': '123', 'method': 'email'},
);

Configuration

// Use presets
await VooLogger.initialize(config: LoggingConfig.development());
await VooLogger.initialize(config: LoggingConfig.production());

// Or customize
await VooLogger.initialize(
  config: LoggingConfig(
    enablePrettyLogs: true,
    showEmojis: true,
    showTimestamp: true,
    showBorders: true,
    showMetadata: true,
    minimumLevel: LogLevel.debug,
  ),
);

Dio Integration

final dio = Dio();
final interceptor = VooDioInterceptor();

dio.interceptors.add(InterceptorsWrapper(
  onRequest: interceptor.onRequest,
  onResponse: interceptor.onResponse,
  onError: interceptor.onError,
));

// All HTTP requests are now logged automatically

Features

  • Zero-config: works out of the box
  • Pretty console output with colors, borders, emojis
  • Persistent storage (survives app restarts)
  • DevTools integration for real-time monitoring
  • Dio interceptor for automatic HTTP logging
  • Cross-platform: iOS, Android, Web, macOS, Windows, Linux

See the README for full documentation.

Classes

LogEntry
LogEntryModel
LogFilter
Filter criteria for querying logs
LoggerContext
Contextual logger for specific modules Why? Automatically adds category/tag context so you don't have to repeat it
LoggerRepository
LoggingConfig
Configuration for VooLogger output and behavior.
LogLevelColor
Value object for log level colors (framework-independent)
LogStatistics
Statistics about stored logs Same as before, but now powered by Sembast
LogTypeConfig
NetworkInterceptor
NetworkLogEntry
VooDioInterceptor
Dio interceptor for automatic network request/response logging.
VooLogger
A zero-config logger for Flutter applications.
VooLoggingPlugin
VooLogging plugin for integration with VooCore.
VooNetworkInterceptor