test-env-log-level-off.cpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2020 Intel Corporation. All Rights Reserved.
3 
4 //#cmake:add-file log-common.h
5 #include "log-common.h"
6 #include <stdlib.h>
7 
8 
9 TEST_CASE( "Without LRS_LOG_LEVEL", "[log]" ) {
10 
11  REQUIRE( ! getenv( "LRS_LOG_LEVEL" ));
12 
13  size_t n_callbacks = 0;
14  auto callback = [&]( rs2_log_severity severity, rs2::log_message const& msg )
15  {
16  ++n_callbacks;
17  TRACE( severity << ' ' << msg.filename() << '+' << msg.line_number() << ": " << msg.raw() );
18  };
19 
21  REQUIRE( !n_callbacks );
22  log_all();
23  REQUIRE( n_callbacks == 1 );
24 }
GLenum GLuint GLenum severity
void log_to_callback(rs2_log_severity min_severity, S callback)
Definition: rs.hpp:139
void log_all()
Definition: log-common.h:35
REQUIRE(n_callbacks==1)
def callback(frame)
Definition: t265_stereo.py:91
rs2_log_severity
Severity of the librealsense logger.
Definition: rs_types.h:153
TEST_CASE("Without LRS_LOG_LEVEL","[log]")


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:11