mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-25 06:04:57 +00:00
- Added detailed logging to the ScriptEngineService to trace initialization status. - Improved logging in SdlAudioService to track audio operations including initialization, shutdown, and playback functions. - Enhanced SdlInputService with logging for key and mouse events, as well as state retrieval. - Updated SdlWindowService to log window creation, destruction, and event polling. - Added logging to ShaderScriptService for shader path loading and Lua state retrieval. - Implemented logging in SwapchainService for swapchain operations, including creation, cleanup, and querying support details. - Enhanced VulkanDeviceService with logging for device creation, shutdown, and memory type queries. - Improved VulkanGuiService with logging for GUI initialization, frame preparation, and rendering operations.
41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
#include "lifecycle_service.hpp"
|
|
|
|
namespace sdl3cpp::services::impl {
|
|
|
|
LifecycleService::LifecycleService(di::ServiceRegistry& registry, std::shared_ptr<ILogger> logger)
|
|
: registry_(registry), logger_(std::move(logger)) {
|
|
if (logger_) {
|
|
logger_->Trace("LifecycleService", "LifecycleService", "registry=provided");
|
|
}
|
|
}
|
|
|
|
void LifecycleService::InitializeAll() {
|
|
if (logger_) {
|
|
logger_->Trace("LifecycleService", "InitializeAll", "", "Entering");
|
|
logger_->Info("LifecycleService::InitializeAll: Initializing all services");
|
|
}
|
|
|
|
registry_.InitializeAll();
|
|
|
|
if (logger_) {
|
|
logger_->Info("LifecycleService::InitializeAll: All services initialized");
|
|
logger_->Trace("LifecycleService", "InitializeAll", "", "Exiting");
|
|
}
|
|
}
|
|
|
|
void LifecycleService::ShutdownAll() noexcept {
|
|
if (logger_) {
|
|
logger_->Trace("LifecycleService", "ShutdownAll", "", "Entering");
|
|
logger_->Info("LifecycleService::ShutdownAll: Shutting down all services");
|
|
}
|
|
|
|
registry_.ShutdownAll();
|
|
|
|
if (logger_) {
|
|
logger_->Info("LifecycleService::ShutdownAll: All services shutdown");
|
|
logger_->Trace("LifecycleService", "ShutdownAll", "", "Exiting");
|
|
}
|
|
}
|
|
|
|
} // namespace sdl3cpp::services::impl
|