feat(app): finalize ad gated flows and weather
- 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
This commit is contained in:
28
lib/core/utils/app_logger.dart
Normal file
28
lib/core/utils/app_logger.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user