diff --git a/airhub_app/lib/core/services/log_center_service.dart b/airhub_app/lib/core/services/log_center_service.dart index 192cab2..d22cc2b 100644 --- a/airhub_app/lib/core/services/log_center_service.dart +++ b/airhub_app/lib/core/services/log_center_service.dart @@ -11,9 +11,13 @@ LogCenterService logCenterService(Ref ref) { } class LogCenterService { - static const String _url = - 'https://qiyuan-log-center-api.airlabs.art/api/v1/logs/report'; + static const String _baseUrl = String.fromEnvironment( + 'LOG_CENTER_URL', + defaultValue: 'https://qiyuan-log-center-api.airlabs.art', + ); + static const String _url = '$_baseUrl/api/v1/logs/report'; static const String _projectId = 'airhub_app'; + static const String _repoUrl = 'https://gitea.airlabs.art/zyc/rtc_prd.git'; late final Dio _dio; @@ -88,8 +92,12 @@ class LogCenterService { final payload = { 'project_id': _projectId, - 'environment': kDebugMode ? 'development' : 'production', + 'environment': const String.fromEnvironment( + 'ENVIRONMENT', + defaultValue: kDebugMode ? 'development' : 'production', + ), 'level': 'ERROR', + 'repo_url': _repoUrl, 'error': { 'type': errorType, 'message': message.length > 2000 ? message.substring(0, 2000) : message,