8 #ifdef BUILD_EASYLOGGINGPP 13 char log_name[] =
"librealsense";
14 static logger_type<log_name> logger;
19 logger.log_to_console(min_severity);
24 logger.log_to_file(min_severity, file_path);
29 logger.log_to_callback( min_severity, callback );
34 logger.reset_logger();
39 logger.enable_rolling_log_file( max_size );
42 #else // BUILD_EASYLOGGINGPP 46 throw std::runtime_error(
"log_to_console is not supported without BUILD_EASYLOGGINGPP");
51 throw std::runtime_error(
"log_to_file is not supported without BUILD_EASYLOGGINGPP");
56 throw std::runtime_error(
"log_to_callback is not supported without BUILD_EASYLOGGINGPP");
61 throw std::runtime_error(
"reset_logger is not supported without BUILD_EASYLOGGINGPP");
66 throw std::runtime_error(
"enable_rolling_log_file is not supported without BUILD_EASYLOGGINGPP");
68 #endif // BUILD_EASYLOGGINGPP
void log_to_callback(rs2_log_severity min_severity, log_callback_ptr callback)
void log_to_file(rs2_log_severity min_severity, const char *file_path)
std::shared_ptr< rs2_log_callback > log_callback_ptr
#define INITIALIZE_EASYLOGGINGPP
void enable_rolling_log_file(unsigned max_size)
void log_to_console(rs2_log_severity min_severity)
rs2_log_severity
Severity of the librealsense logger.