import 'dart:developer' as developer;
import 'package:flutter/foundation.dart';

class AppLogger {
  /// Custom print function that only logs in debug mode.
  static void print(String message, {String name = 'Musadaq'}) {
    if (kDebugMode) {
      developer.log(message, name: name);
    }
  }

  /// Custom error logger
  static void error(String message, [dynamic error, StackTrace? stackTrace]) {
    if (kDebugMode) {
      developer.log(message, name: 'Musadaq_Error', error: error, stackTrace: stackTrace);
    }
  }
}
