-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[coro_http] [easylog] use easylog instead of std::cout
- Loading branch information
1 parent
dd666cf
commit ff6da2c
Showing
6 changed files
with
99 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
namespace cinatra { | ||
struct null_logger_t { | ||
template <typename T> | ||
const null_logger_t& operator<<(T&&) const { | ||
return *this; | ||
} | ||
}; | ||
} // namespace cinatra | ||
|
||
constexpr inline cinatra::null_logger_t NULL_LOGGER; | ||
|
||
#ifdef CINATRA_LOG_ENDL | ||
#else | ||
#define CINATRA_LOG_ENDL << std::endl | ||
#endif | ||
|
||
#ifdef CINATRA_LOG_ERROR | ||
#else | ||
#define CINATRA_LOG_ERROR std::cerr | ||
#endif | ||
|
||
#ifdef CINATRA_LOG_WARNING | ||
#else | ||
#ifndef NDEBUG | ||
#define CINATRA_LOG_WARNING std::cerr | ||
#else | ||
#define CINATRA_LOG_WARNING NULL_LOGGER | ||
#endif | ||
#endif | ||
|
||
#ifdef CINATRA_LOG_INFO | ||
#else | ||
#ifndef NDEBUG | ||
#define CINATRA_LOG_INFO std::cout | ||
#else | ||
#define CINATRA_LOG_INFO NULL_LOGGER | ||
#endif | ||
#endif | ||
|
||
#ifdef CINATRA_LOG_DEBUG | ||
#else | ||
#ifndef NDEBUG | ||
#define CINATRA_LOG_DEBUG std::cout | ||
#else | ||
#define CINATRA_LOG_DEBUG NULL_LOGGER | ||
#endif | ||
#endif | ||
|
||
#ifdef CINATRA_LOG_TRACE | ||
#else | ||
#ifndef NDEBUG | ||
#define CINATRA_LOG_TRACE std::cout | ||
#else | ||
#define CINATRA_LOG_TRACE NULL_LOGGER | ||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters