mirror of
https://github.com/johndoe6345789/SDL3CPlusPlus.git
synced 2026-04-25 14:15:02 +00:00
feat: Enhance logging system with platform-specific error handling and trace functionality
- Added platform detection and user configuration directory retrieval in platform.cpp and platform.hpp. - Implemented detailed error reporting for Windows in platform.cpp. - Updated logger to use std::source_location for improved trace logging in logger.hpp. - Refactored existing trace guards in various application files to remove function name parameters, utilizing the new logger functionality. - Introduced a new script (add_traces.sh) to automate the addition of logging includes in relevant source files. - Enhanced audio_player.cpp and other script files to include detailed logging for function entries and variable states.
This commit is contained in:
@@ -25,7 +25,7 @@ ScriptEngine::ScriptEngine(const std::filesystem::path& scriptPath, bool debugEn
|
||||
shaderManager_(std::make_unique<ShaderManager>(L_)),
|
||||
guiManager_(std::make_unique<GuiManager>(L_)),
|
||||
audioManager_(std::make_unique<AudioManager>(scriptDirectory_)) {
|
||||
sdl3cpp::logging::TraceGuard trace(__PRETTY_FUNCTION__);;
|
||||
sdl3cpp::logging::TraceGuard trace;;
|
||||
if (!L_) {
|
||||
sdl3cpp::logging::Logger::GetInstance().Error("Failed to create Lua state");
|
||||
throw std::runtime_error("Failed to create Lua state");
|
||||
|
||||
Reference in New Issue
Block a user