Refactor logging and tracing in SDL3 application

- Replaced macro-based logging with a dedicated Logger class for improved readability and maintainability.
- Introduced TraceGuard class for automatic function entry/exit logging.
- Updated all relevant source files to utilize the new logging and tracing mechanisms.
- Consolidated SDL_MAIN_HANDLED definition into a separate header file (sdl_macros.hpp) for better organization.
- Ensured consistent logging practices across the application, including error handling and debug information.
This commit is contained in:
2026-01-04 01:14:05 +00:00
parent b5af532c19
commit 198179bfca
20 changed files with 133 additions and 106 deletions

View File

@@ -1,4 +1,5 @@
#include "script/physics_bridge.hpp"
#include "logging/logger.hpp"
#include <btBulletDynamicsCommon.h>
@@ -14,6 +15,7 @@ PhysicsBridge::PhysicsBridge()
broadphase_.get(),
solver_.get(),
collisionConfig_.get())) {
sdl3cpp::logging::TraceGuard trace(__PRETTY_FUNCTION__);
world_->setGravity(btVector3(0.0f, -9.81f, 0.0f));
}