I am currently implementing a library where I use spdlog for logging. In order to disable logging in Release mode the following can be implemented:
#if !defined(NDEBUG)
LOG(...) Logger::log(__VA_ARGS__)
#else
#define LOG(...) (void)0
#endif
So if LOG(...)
macro is empty in Release mode should the spdlog be not linked to the library? So that application that uses my library wouldn't have to be distributed with spdlog dll. What is the correct approach?