Commit 830ff807 authored by Matthias Vallentin's avatar Matthias Vallentin

Demote errors to normal log events

parent 51b1991a
...@@ -190,18 +190,6 @@ private: ...@@ -190,18 +190,6 @@ private:
#define CAF_LOG_LEVEL_DEBUG 3 #define CAF_LOG_LEVEL_DEBUG 3
#define CAF_LOG_LEVEL_TRACE 4 #define CAF_LOG_LEVEL_TRACE 4
#define CAF_PRINT_ERROR_IMPL(nclass, nfun, message) \
do { \
caf::logger::line_builder lb; \
lb << message; \
if (nclass.empty()) \
printf("[ERROR] in %s:%d %s::%s: %s\n", __FILE__, __LINE__, \
nclass.c_str(), nfun, lb.get().c_str()); \
else \
printf("[ERROR] in %s:%d %s: %s\n", __FILE__, __LINE__, \
nfun, lb.get().c_str()); \
} while (false)
#define CAF_ARG(argument) caf::logger::make_arg_wrapper(#argument, argument) #define CAF_ARG(argument) caf::logger::make_arg_wrapper(#argument, argument)
#ifdef CAF_MSVC #ifdef CAF_MSVC
...@@ -289,6 +277,8 @@ inline caf::actor_id caf_set_aid_dummy() { return 0; } ...@@ -289,6 +277,8 @@ inline caf::actor_id caf_set_aid_dummy() { return 0; }
# define CAF_LOG_WARNING(output) CAF_LOG_IMPL(CAF_LOG_LEVEL_WARNING, output) # define CAF_LOG_WARNING(output) CAF_LOG_IMPL(CAF_LOG_LEVEL_WARNING, output)
#endif #endif
#define CAF_LOG_ERROR(output) CAF_LOG_IMPL(CAF_LOG_LEVEL_ERROR, output)
#endif // CAF_LOG_LEVEL #endif // CAF_LOG_LEVEL
#ifndef CAF_LOG_INFO #ifndef CAF_LOG_INFO
...@@ -303,11 +293,9 @@ inline caf::actor_id caf_set_aid_dummy() { return 0; } ...@@ -303,11 +293,9 @@ inline caf::actor_id caf_set_aid_dummy() { return 0; }
# define CAF_LOG_WARNING(output) CAF_VOID_STMT # define CAF_LOG_WARNING(output) CAF_VOID_STMT
#endif #endif
#define CAF_LOG_ERROR(output) \ #ifndef CAF_LOG_ERROR
do { \ # define CAF_LOG_ERROR(output) CAF_VOID_STMT
CAF_PRINT_ERROR_IMPL(CAF_GET_CLASS_NAME, __func__, output); \ #endif
CAF_LOG_IMPL(CAF_LOG_LEVEL_ERROR, output); \
} while (false)
#ifdef CAF_LOG_LEVEL #ifdef CAF_LOG_LEVEL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment