import 'dart:developer' as dev;

/// Logger minimal de l'application. Remplace les appels directs à print().
/// Silencieux en release (les blocs assert sont retirés du build release).
class AppLogger {
  AppLogger._();

  static void info(String message) {
    assert(() {
      dev.log(message, name: 'INFO');
      return true;
    }());
  }

  static void error(String message, [Object? error, StackTrace? stackTrace]) {
    assert(() {
      dev.log(message, name: 'ERROR', error: error, stackTrace: stackTrace);
      return true;
    }());
  }
}
