9 #define CATCH_CONFIG_MAIN 14 #define TRACE(X) do { \ 18 #define TRACE(X) do {} while(0) 21 #include "../src/log.h" 27 TEST_CASE(
"rs2_log vs LOG() - internal",
"[log]" )
29 size_t n_callbacks = 0;
38 TRACE(
data->logMessage()->logger()->logBuilder()->build(
data->logMessage(), true ));
41 el::Helpers::installLogDispatchCallback< default_dispatcher >(
"default_dispatcher" );
42 auto dispatcher = el::Helpers::logDispatchCallback< default_dispatcher >(
"default_dispatcher" );
48 LOG(
INFO) <<
"Log message to default logger";
52 CLOG(
INFO,
"librealsense") <<
"Log message to \"librealsense\" logger";
56 LOG_INFO(
"Log message using LOG_INFO()" );
void handle(const el::LogDispatchData *data) noexceptoverride
LOG(INFO)<< "Log message to default logger"
void rs2_log(rs2_log_severity severity, const char *message, rs2_error **error)
CLOG(INFO,"librealsense")<< "Log message to \"librealsense\" logger"
LOG_INFO("Log message using LOG_INFO()")
REQUIRE_NOTHROW(rs2_log(RS2_LOG_SEVERITY_INFO,"Log message using rs2_log()", nullptr))
el::Helpers::uninstallLogDispatchCallback< el::base::DefaultLogDispatchCallback >("DefaultLogDispatchCallback")