Commit e0aaa1db authored by Dominik Charousset's avatar Dominik Charousset

Fix compilation with logging disabled

parent ecee4ead
...@@ -366,6 +366,14 @@ bool operator==(const logger::field& x, const logger::field& y); ...@@ -366,6 +366,14 @@ bool operator==(const logger::field& x, const logger::field& y);
#define CAF_LOG_COMPONENT "caf" #define CAF_LOG_COMPONENT "caf"
#endif // CAF_LOG_COMPONENT #endif // CAF_LOG_COMPONENT
#define CAF_LOG_MAKE_EVENT(aid, component, loglvl, message) \
::caf::logger::event { \
loglvl, component, CAF_PRETTY_FUN, __func__, \
caf::logger::skip_path(__FILE__), __LINE__, \
(::caf::logger::line_builder{} << message).get(), \
::std::this_thread::get_id(), aid, ::caf::make_timestamp() \
}
#if CAF_LOG_LEVEL == -1 #if CAF_LOG_LEVEL == -1
#define CAF_LOG_IMPL(unused1, unused2, unused3) #define CAF_LOG_IMPL(unused1, unused2, unused3)
...@@ -385,14 +393,6 @@ inline caf::actor_id caf_set_aid_dummy() { return 0; } ...@@ -385,14 +393,6 @@ inline caf::actor_id caf_set_aid_dummy() { return 0; }
#else // CAF_LOG_LEVEL #else // CAF_LOG_LEVEL
#define CAF_LOG_MAKE_EVENT(aid, component, loglvl, message) \
::caf::logger::event { \
loglvl, component, CAF_PRETTY_FUN, __func__, \
caf::logger::skip_path(__FILE__), __LINE__, \
(::caf::logger::line_builder{} << message).get(), \
::std::this_thread::get_id(), aid, ::caf::make_timestamp() \
}
#define CAF_LOG_IMPL(component, loglvl, message) \ #define CAF_LOG_IMPL(component, loglvl, message) \
do { \ do { \
auto CAF_UNIFYN(caf_logger) = caf::logger::current_logger(); \ auto CAF_UNIFYN(caf_logger) = caf::logger::current_logger(); \
......
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