logInfo static method

void logInfo(
  1. String message, {
  2. String? tag,
  3. Map<String, dynamic>? data,
})

Logs an informational message using Logar.

This method logs general information about application flow and important events that are not errors or warnings.

Parameters:

  • message - The informational message to log
  • tag - Optional tag for categorizing the log entry
  • data - Optional additional data for context

Usage

// Log payment initiation
AmwalLogger.logInfo(
  'Payment initiated',
  tag: 'PAYMENT',
  data: {'transactionId': '123', 'amount': 100.0},
);

// Log user action
AmwalLogger.logInfo(
  'User selected payment method',
  tag: 'USER_ACTION',
  data: {'paymentMethod': 'card', 'userId': 'user_456'},
);

When to Use

Use this method for:

  • Application flow milestones
  • User actions and interactions
  • Business process steps
  • Performance metrics and timing
  • Configuration changes

Tagging Strategy

Use meaningful tags to categorize logs:

  • PAYMENT: Payment-related operations
  • USER_ACTION: User interactions
  • API: API calls and responses
  • CONFIG: Configuration changes
  • PERFORMANCE: Performance metrics

Implementation

static void logInfo(
  String message, {
  String? tag,
  Map<String, dynamic>? data,
}) {
  Logar.info(message, tag: tag ?? 'AMWAL_LOGGER', data: data);
}