Commit aa19f8cb authored by Alexei Zakharov's avatar Alexei Zakharov

enable/disable logging according to CAF_LOG_LEVEL

parent aa516656
...@@ -274,11 +274,32 @@ inline caf::actor_id caf_set_aid_dummy() { return 0; } ...@@ -274,11 +274,32 @@ inline caf::actor_id caf_set_aid_dummy() { return 0; }
#endif // CAF_LOG_LEVEL < CAF_LOG_LEVEL_TRACE #endif // CAF_LOG_LEVEL < CAF_LOG_LEVEL_TRACE
#if CAF_LOG_LEVEL >= CAF_LOG_LEVEL_DEBUG
# define CAF_LOG_DEBUG(output) CAF_LOG_IMPL(CAF_LOG_LEVEL_DEBUG, output)
#endif
#if CAF_LOG_LEVEL >= CAF_LOG_LEVEL_INFO
# define CAF_LOG_INFO(output) CAF_LOG_IMPL(CAF_LOG_LEVEL_INFO, output)
#endif
#if CAF_LOG_LEVEL >= CAF_LOG_LEVEL_WARNING
# define CAF_LOG_WARNING(output) CAF_LOG_IMPL(CAF_LOG_LEVEL_WARNING, output)
#endif
#endif // CAF_LOG_LEVEL #endif // CAF_LOG_LEVEL
#define CAF_LOG_DEBUG(output) CAF_LOG_IMPL(CAF_LOG_LEVEL_DEBUG, output) #ifndef CAF_LOG_INFO
#define CAF_LOG_INFO(output) CAF_LOG_IMPL(CAF_LOG_LEVEL_INFO, output) # define CAF_LOG_INFO(output) CAF_VOID_STMT
#define CAF_LOG_WARNING(output) CAF_LOG_IMPL(CAF_LOG_LEVEL_WARNING, output) #endif
#ifndef CAF_LOG_DEBUG
# define CAF_LOG_DEBUG(output) CAF_VOID_STMT
#endif
#ifndef CAF_LOG_WARNING
# define CAF_LOG_WARNING(output) CAF_VOID_STMT
#endif
#define CAF_LOG_ERROR(output) \ #define CAF_LOG_ERROR(output) \
do { \ do { \
CAF_PRINT_ERROR_IMPL(CAF_GET_CLASS_NAME, __func__, output); \ CAF_PRINT_ERROR_IMPL(CAF_GET_CLASS_NAME, __func__, output); \
......
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