|
|
|
@@ -5,6 +5,16 @@ |
|
|
|
#cmakedefine CPPMICROHTTPD_LOGGING_STDCOUT |
|
|
|
#cmakedefine CPPMICROHTTPD_LOGGING_CPPLOGGING |
|
|
|
|
|
|
|
namespace __impl |
|
|
|
{ |
|
|
|
struct fake_log |
|
|
|
{ |
|
|
|
template<typename... T_args> |
|
|
|
fake_log& operator << (T_args&&...) |
|
|
|
{ return *this; } |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
#if defined(CPPMICROHTTPD_LOGGING_CPPLOGGING) |
|
|
|
#include <cpplogging/interface.h> |
|
|
|
#define cppmicrohttpd_log(p_level) \ |
|
|
|
@@ -20,11 +30,11 @@ |
|
|
|
cppmicrohttpd_log(debug) << __VA_ARGS__ |
|
|
|
#else |
|
|
|
#define cppmicrohttpd_log_debug(...) \ |
|
|
|
do { } while (0) |
|
|
|
__impl::fake_log() |
|
|
|
#endif |
|
|
|
#else |
|
|
|
#define cppmicrohttpd_log(...) \ |
|
|
|
do { } while (0) |
|
|
|
__impl::fake_log() |
|
|
|
#define cppmicrohttpd_log_debug(...) \ |
|
|
|
do { } while (0) |
|
|
|
__impl::fake_log() |
|
|
|
#endif |