spdlog Refs: 1 How to enable/disable spdlog logging before compilation You can disable all logging before you compile the code by adding the following macro (before including spdlog.h): #define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_OFF #include<spdlog.h> Refs: 1, 2