Skip to content

Commit 3d56532

Browse files
committed
feat(api): add confirmation logging to dependency container
Adds a log message to the `init` method of the `DependencyContainer`. This provides an explicit log entry confirming that the container has been successfully populated with all service and repository instances during the server startup sequence.
1 parent 7dbf541 commit 3d56532

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/src/config/dependency_container.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore_for_file: public_member_api_docs
2+
13
import 'package:ht_api/src/rbac/permission_service.dart';
24
import 'package:ht_api/src/services/auth_service.dart';
35
import 'package:ht_api/src/services/auth_token_service.dart';
@@ -8,6 +10,7 @@ import 'package:ht_api/src/services/verification_code_storage_service.dart';
810
import 'package:ht_data_repository/ht_data_repository.dart';
911
import 'package:ht_email_repository/ht_email_repository.dart';
1012
import 'package:ht_shared/ht_shared.dart';
13+
import 'package:logging/logging.dart';
1114

1215
/// {@template dependency_container}
1316
/// A singleton service locator for managing and providing access to all shared
@@ -51,6 +54,8 @@ class DependencyContainer {
5154
/// The single, global instance of the [DependencyContainer].
5255
static final instance = DependencyContainer._();
5356

57+
final _log = Logger('DependencyContainer');
58+
5459
// --- Repositories ---
5560
late final HtDataRepository<Headline> headlineRepository;
5661
late final HtDataRepository<Category> categoryRepository;
@@ -111,5 +116,7 @@ class DependencyContainer {
111116
this.dashboardSummaryService = dashboardSummaryService;
112117
this.permissionService = permissionService;
113118
this.userPreferenceLimitService = userPreferenceLimitService;
119+
120+
_log.info('[INIT_SEQ] 6. Dependency container populated successfully.');
114121
}
115122
}

0 commit comments

Comments
 (0)