24 TRACE(
"OUR: " <<
data->logMessage()->logger()->logBuilder()->build(
data->logMessage(), true ) );
36 el::Helpers::installLogDispatchCallback< our_dispatcher >(
"our_dispatcher" );
37 auto dispatcher = el::Helpers::logDispatchCallback< our_dispatcher >(
"our_dispatcher" );
46 TRACE(
"LRS: " << severity <<
' ' << msg.filename() <<
'+' << msg.line_number() <<
": " << msg.raw() );
53 n_callbacks_lrs = n_callbacks_our = 0;
62 SECTION(
"lrs should get its own callbacks" ) {
67 SECTION(
"default log; no callbacks" ) {
68 LOG(
INFO) <<
"LOG() message to our logger";
72 SECTION(
"our logger is separate from librealsense logger" ) {
74 CLOG(
INFO,
"librealsense" ) <<
"LOG() message to \"librealsense\" logger";
GLenum GLuint GLenum severity
void log_to_callback(rs2_log_severity min_severity, S callback)
TEST_CASE_METHOD(test_fixture,"rs2::log vs LOG()","[log]")
LOG(INFO)<< "Log message to default logger"
CLOG(INFO,"librealsense")<< "Log message to \"librealsense\" logger"
void handle(const el::LogDispatchData *data) noexceptoverride
rs2_log_severity
Severity of the librealsense logger.
el::Helpers::uninstallLogDispatchCallback< el::base::DefaultLogDispatchCallback >("DefaultLogDispatchCallback")