feat(core): add AppLogger

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Maxiwere45 2026-06-09 10:50:31 +02:00
parent 6b150945fa
commit 2a3f489a2d

18
lib/core/logger.dart Normal file
View File

@ -0,0 +1,18 @@
import 'package:flutter/foundation.dart';
/// Logger minimal de l'application. Remplace les appels directs à print().
/// Silencieux en release.
class AppLogger {
AppLogger._();
static void info(String message) {
if (kDebugMode) debugPrint('[INFO] $message');
}
static void error(String message, [Object? error, StackTrace? stackTrace]) {
if (kDebugMode) {
debugPrint('[ERROR] $message${error != null ? ' : $error' : ''}');
if (stackTrace != null) debugPrint(stackTrace.toString());
}
}
}