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/shader_manager.hpp"
#include "logging/logger.hpp"
#include <lua.hpp>
@@ -8,7 +9,9 @@
namespace sdl3cpp::script {
ShaderManager::ShaderManager(lua_State* L) : L_(L) {}
ShaderManager::ShaderManager(lua_State* L) : L_(L) {
sdl3cpp::logging::TraceGuard trace(__PRETTY_FUNCTION__);
}
std::unordered_map<std::string, ShaderManager::ShaderPaths> ShaderManager::LoadShaderPathsMap() {
lua_getglobal(L_, "get_shader_paths");