vyuh_plugin_telemetry_provider_console 1.2.0 copy "vyuh_plugin_telemetry_provider_console: ^1.2.0" to clipboard
vyuh_plugin_telemetry_provider_console: ^1.2.0 copied to clipboard

Console logger telemetry provider for Vyuh

Vyuh Logo

Vyuh Framework

Build Modular, Scalable, CMS-driven Flutter Apps

Docs | Website

Vyuh Console Telemetry Provider 📊 #

vyuh_plugin_telemetry_provider_console

A simple console-based telemetry provider for the Vyuh framework that logs telemetry events, errors, and messages to the console using the logger package. This provider is ideal for development and debugging scenarios where you need to monitor application events and errors in real-time through the console.

Features #

  • Console Logging : Log telemetry events directly to the console with pretty formatting
  • Error Tracking : Detailed error logging with stack traces
  • Flutter Error Support : Special handling for Flutter-specific errors
  • Log Levels : Support for multiple log levels (fatal, error, warning, info, debug, trace)
  • Pretty Printing : Formatted output for better readability
  • No External Dependencies : Only requires the logger package

Installation #

Add this to your package's pubspec.yaml file:

dependencies:
  vyuh_plugin_telemetry_provider_console: ^1.0.0

Usage 💡 #

Basic Setup #

Add the console telemetry provider to your Vyuh app's plugin configuration:

import 'package:vyuh_core/vyuh_core.dart';
import 'package:vyuh_plugin_telemetry_provider_console/vyuh_plugin_telemetry_provider_console.dart';

void main() {
  runApp(
    plugins: vyuh.PluginDescriptor(
      telemetry: vyuh.TelemetryPlugin(
        providers: [
          ConsoleLoggerTelemetryProvider(),
        ],
      ),
      // ... other plugins
    ),
    features: () => [
      // Your features here
    ],
  );
}

Logging Examples #

The provider will automatically log various telemetry events:

// Log a message
vyuh.telemetry.reportMessage(
  'User logged in',
  level: LogLevel.info,
);

// Log an error
try {
  // Some operation
} catch (e, stack) {
  vyuh.telemetry.reportError(
    e,
    stackTrace: stack,
    fatal: false,
  );
}

// Flutter errors are automatically logged
FlutterError.onError = (details) {
  vyuh.telemetry.reportFlutterError(details);
};

Configuration #

The console logger is configured with sensible defaults:

  • Colors disabled for better cross-platform compatibility
  • No boxing for cleaner output
  • Method count set to 0 to reduce noise
  • Line length of 80 characters

Log Levels #

The provider supports the following log levels:

  • Fatal : Critical errors that crash the application
  • Error : Errors that need immediate attention
  • Warning : Important issues that don't require immediate action
  • Info : General information about application flow
  • Debug : Detailed information for debugging
  • Trace : Very detailed debugging information

Contributing 🤝 #

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Learn More 📚 #


Made with ❤️ by Vyuh

1
likes
130
points
104
downloads

Publisher

verified publishervyuh.tech

Weekly Downloads

Console logger telemetry provider for Vyuh

Documentation

API reference

License

unknown (license)

Dependencies

flutter, logger, vyuh_core

More

Packages that depend on vyuh_plugin_telemetry_provider_console