mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-25 14:15:02 +00:00
feat: Enhance logging in various controllers and services for better traceability
This commit is contained in:
@@ -5,31 +5,33 @@ namespace sdl3cpp::controllers {
|
||||
|
||||
LifecycleController::LifecycleController(di::ServiceRegistry& registry)
|
||||
: registry_(registry) {
|
||||
logging::TraceGuard trace;
|
||||
logging::Logger::GetInstance().Trace("LifecycleController::LifecycleController: Created");
|
||||
}
|
||||
|
||||
LifecycleController::~LifecycleController() {
|
||||
logging::TraceGuard trace;
|
||||
logging::Logger::GetInstance().Trace("LifecycleController::~LifecycleController: Destroyed");
|
||||
}
|
||||
|
||||
void LifecycleController::InitializeAll() {
|
||||
logging::TraceGuard trace;
|
||||
logging::Logger::GetInstance().Info("Initializing all services");
|
||||
logging::Logger::GetInstance().Trace("LifecycleController::InitializeAll: Entering");
|
||||
logging::Logger::GetInstance().Info("LifecycleController::InitializeAll: Initializing all services");
|
||||
|
||||
// ServiceRegistry handles initialization order based on dependencies
|
||||
registry_.InitializeAll();
|
||||
|
||||
logging::Logger::GetInstance().Info("All services initialized");
|
||||
logging::Logger::GetInstance().Info("LifecycleController::InitializeAll: All services initialized");
|
||||
logging::Logger::GetInstance().Trace("LifecycleController::InitializeAll: Exiting");
|
||||
}
|
||||
|
||||
void LifecycleController::ShutdownAll() noexcept {
|
||||
logging::TraceGuard trace;
|
||||
logging::Logger::GetInstance().Info("Shutting down all services");
|
||||
logging::Logger::GetInstance().Trace("LifecycleController::ShutdownAll: Entering");
|
||||
logging::Logger::GetInstance().Info("LifecycleController::ShutdownAll: Shutting down all services");
|
||||
|
||||
// ServiceRegistry handles shutdown in reverse dependency order
|
||||
registry_.ShutdownAll();
|
||||
|
||||
logging::Logger::GetInstance().Info("All services shutdown");
|
||||
logging::Logger::GetInstance().Info("LifecycleController::ShutdownAll: All services shutdown");
|
||||
logging::Logger::GetInstance().Trace("LifecycleController::ShutdownAll: Exiting");
|
||||
}
|
||||
|
||||
} // namespace sdl3cpp::controllers
|
||||
|
||||
Reference in New Issue
Block a user