- add AppLogger and replace scattered print logging\n- implement ad-gated recommendation flow with reminder handling and calendar link\n- complete Bluetooth share pipeline with ad gate and merge\n- integrate KMA weather API with caching and dart-define decoding\n- add NaverUrlProcessor refactor and restore restaurant repository tests
29 lines
711 B
Dart
29 lines
711 B
Dart
import 'package:flutter/foundation.dart';
|
|
|
|
/// 앱 전역에서 사용하는 로거.
|
|
/// debugPrint를 감싸 경고 없이 로그를 남기며, debug 레벨은 디버그 모드에서만 출력합니다.
|
|
class AppLogger {
|
|
AppLogger._();
|
|
|
|
static void debug(String message) {
|
|
if (kDebugMode) {
|
|
debugPrint(message);
|
|
}
|
|
}
|
|
|
|
static void info(String message) {
|
|
debugPrint(message);
|
|
}
|
|
|
|
static void error(String message, {Object? error, StackTrace? stackTrace}) {
|
|
final buffer = StringBuffer(message);
|
|
if (error != null) {
|
|
buffer.write(' | error: $error');
|
|
}
|
|
if (stackTrace != null) {
|
|
buffer.write('\n$stackTrace');
|
|
}
|
|
debugPrint(buffer.toString());
|
|
}
|
|
}
|