Não pode escolher mais do que 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
|
- #pragma once
-
- #cmakedefine CPPMICROHTTPD_DEBUG
- #cmakedefine CPPMICROHTTPD_LOGGING_NONE
- #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) \
- cpplogging_global_log(p_level)
- #define cppmicrohttpd_log_debug(...) \
- cppmicrohttpd_log(debug) << __VA_ARGS__
- #elif defined(CPPMICROHTTPD_LOGGING_STDCOUT)
- #include <iostream>
- #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
|