#pragma once #cmakedefine CPPMICROHTTPD_DEBUG #cmakedefine CPPMICROHTTPD_LOGGING_NONE #cmakedefine CPPMICROHTTPD_LOGGING_STDCOUT #cmakedefine CPPMICROHTTPD_LOGGING_CPPLOGGING namespace __impl { struct fake_log { template fake_log& operator << (T_args&&...) { return *this; } }; } #if defined(CPPMICROHTTPD_LOGGING_CPPLOGGING) #include #define cppmicrohttpd_log(p_level) \ cpplogging_global_log(p_level) #define cppmicrohttpd_log_debug(...) \ cppmicrohttpd_log(debug) << __VA_ARGS__ #elif defined(CPPMICROHTTPD_LOGGING_STDCOUT) #include #define cppmicrohttpd_log(p_level) \ ::std::cout << #p_level << ' ' << __FILE__ << ':' << __LINE__ << " - " #ifdef CPPMICROHTTPD_DEBUG #define cppmicrohttpd_log_debug(...) \ cppmicrohttpd_log(debug) << __VA_ARGS__ #else #define cppmicrohttpd_log_debug(...) \ __impl::fake_log() #endif #else #define cppmicrohttpd_log(...) \ __impl::fake_log() #define cppmicrohttpd_log_debug(...) \ __impl::fake_log() #endif