From 5f11c609c1a2e2d05d9a68d42733c7bac1856be5 Mon Sep 17 00:00:00 2001 From: Kieran Kihn <114803508+kierankihn@users.noreply.github.com> Date: Thu, 11 Dec 2025 23:07:46 +0800 Subject: [PATCH] feat(logging): enable fine-grained spdlog levels based on build type --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fdd1fac..f16de3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,12 @@ target_link_libraries(uno-game-lib PUBLIC Slint::Slint) target_link_libraries(uno-game-lib PUBLIC argparse::argparse) target_link_libraries(uno-game-lib PUBLIC spdlog::spdlog) +# Enable fine-grained spdlog levels: in Debug build, compile-in trace/debug; in others, keep info+ +target_compile_definitions(uno-game-lib PUBLIC + $<$:SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE> + $<$>:SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_INFO> +) + slint_target_sources(uno-game-lib ui/MainWindow.slint) # Uno Client