logInfo static method
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 logtag- Optional tag for categorizing the log entrydata- 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);
}