diff --git a/src/examples/CMakeLists.txt b/src/examples/CMakeLists.txt index e032be51fbabe9b1b30f0c17eb3687654f5ab675..9d8fdb78e3404c0855f0f3829880006573d74025 100644 --- a/src/examples/CMakeLists.txt +++ b/src/examples/CMakeLists.txt @@ -9,6 +9,9 @@ ADD_EXECUTABLE(test_sh_ptr test_sh_ptr.cpp) ADD_EXECUTABLE(test_wolf_root test_wolf_root.cpp) +ADD_EXECUTABLE(test_wolf_logging test_wolf_logging.cpp) +TARGET_LINK_LIBRARIES(test_wolf_logging ${PROJECT_NAME}) + IF(Ceres_FOUND) # test_processor_odom_3D ADD_EXECUTABLE(test_processor_odom_3D test_processor_odom_3D.cpp) diff --git a/src/examples/test_wolf_logging.cpp b/src/examples/test_wolf_logging.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7b7eb0bde36499d71578b086101685261a52bd45 --- /dev/null +++ b/src/examples/test_wolf_logging.cpp @@ -0,0 +1,34 @@ +/** + * \file test_wolf_logging.cpp + * + * Created on: Oct 28, 2016 + * \author: Jeremie Deray + */ + +#include "wolf.h" +#include "logging.h" + +int main(int, char*[]) +{ + WOLF_INFO("test info ", 5, " ", 0.123); + + WOLF_WARN("test warn ", 5, " ", 0.123); + + WOLF_ERROR("test error ", 5, " ", 0.123); + + WOLF_TRACE("test trace ", 5, " ", 0.123); + + WOLF_DEBUG("test debug ", 5, " ", 0.123); + + // manually enable debug logging + WOLF_ENABLE_DEBUG_LOG(); + + WOLF_DEBUG("test enable debug"); + + // manually disable debug logging + WOLF_DISABLE_DEBUG_LOG(); + + WOLF_DEBUG("test disable debug"); + + return 0; +}