OpenCV  3.4.7
Open Source Computer Vision
Namespaces | Macros | Enumerations | Functions
logger.hpp File Reference
#include <iostream>
#include <sstream>
#include <limits.h>
#include "logger.defines.hpp"

Namespaces

 cv
 
 cv::utils
 
 cv::utils::logging
 
 cv::utils::logging::internal
 

Macros

#define CV_LOG_DEBUG(tag, ...)   for(;;) { if (cv::utils::logging::getLogLevel() < cv::utils::logging::LOG_LEVEL_DEBUG) break; std::stringstream ss; ss << __VA_ARGS__; cv::utils::logging::internal::writeLogMessage(cv::utils::logging::LOG_LEVEL_DEBUG, ss.str().c_str()); break; }
 
#define CV_LOG_ERROR(tag, ...)   for(;;) { if (cv::utils::logging::getLogLevel() < cv::utils::logging::LOG_LEVEL_ERROR) break; std::stringstream ss; ss << __VA_ARGS__; cv::utils::logging::internal::writeLogMessage(cv::utils::logging::LOG_LEVEL_ERROR, ss.str().c_str()); break; }
 
#define CV_LOG_FATAL(tag, ...)   for(;;) { if (cv::utils::logging::getLogLevel() < cv::utils::logging::LOG_LEVEL_FATAL) break; std::stringstream ss; ss << __VA_ARGS__; cv::utils::logging::internal::writeLogMessage(cv::utils::logging::LOG_LEVEL_FATAL, ss.str().c_str()); break; }
 
#define CV_LOG_INFO(tag, ...)   for(;;) { if (cv::utils::logging::getLogLevel() < cv::utils::logging::LOG_LEVEL_INFO) break; std::stringstream ss; ss << __VA_ARGS__; cv::utils::logging::internal::writeLogMessage(cv::utils::logging::LOG_LEVEL_INFO, ss.str().c_str()); break; }
 
#define CV_LOG_STRIP_LEVEL   CV_LOG_LEVEL_VERBOSE
 
#define CV_LOG_VERBOSE(tag, v, ...)
 
#define CV_LOG_WARNING(tag, ...)   for(;;) { if (cv::utils::logging::getLogLevel() < cv::utils::logging::LOG_LEVEL_WARNING) break; std::stringstream ss; ss << __VA_ARGS__; cv::utils::logging::internal::writeLogMessage(cv::utils::logging::LOG_LEVEL_WARNING, ss.str().c_str()); break; }
 

Enumerations

enum  cv::utils::logging::LogLevel {
  cv::utils::logging::LOG_LEVEL_SILENT = 0,
  cv::utils::logging::LOG_LEVEL_FATAL = 1,
  cv::utils::logging::LOG_LEVEL_ERROR = 2,
  cv::utils::logging::LOG_LEVEL_WARNING = 3,
  cv::utils::logging::LOG_LEVEL_INFO = 4,
  cv::utils::logging::LOG_LEVEL_DEBUG = 5,
  cv::utils::logging::LOG_LEVEL_VERBOSE = 6
}
 Supported logging levels and their semantic. More...
 

Functions

LogLevel cv::utils::logging::getLogLevel ()
 
LogLevel cv::utils::logging::setLogLevel (LogLevel logLevel)
 
void cv::utils::logging::internal::writeLogMessage (LogLevel logLevel, const char *message)
 

Macro Definition Documentation

§ CV_LOG_DEBUG

#define CV_LOG_DEBUG (   tag,
  ... 
)    for(;;) { if (cv::utils::logging::getLogLevel() < cv::utils::logging::LOG_LEVEL_DEBUG) break; std::stringstream ss; ss << __VA_ARGS__; cv::utils::logging::internal::writeLogMessage(cv::utils::logging::LOG_LEVEL_DEBUG, ss.str().c_str()); break; }

§ CV_LOG_ERROR

#define CV_LOG_ERROR (   tag,
  ... 
)    for(;;) { if (cv::utils::logging::getLogLevel() < cv::utils::logging::LOG_LEVEL_ERROR) break; std::stringstream ss; ss << __VA_ARGS__; cv::utils::logging::internal::writeLogMessage(cv::utils::logging::LOG_LEVEL_ERROR, ss.str().c_str()); break; }

§ CV_LOG_FATAL

#define CV_LOG_FATAL (   tag,
  ... 
)    for(;;) { if (cv::utils::logging::getLogLevel() < cv::utils::logging::LOG_LEVEL_FATAL) break; std::stringstream ss; ss << __VA_ARGS__; cv::utils::logging::internal::writeLogMessage(cv::utils::logging::LOG_LEVEL_FATAL, ss.str().c_str()); break; }

§ CV_LOG_INFO

#define CV_LOG_INFO (   tag,
  ... 
)    for(;;) { if (cv::utils::logging::getLogLevel() < cv::utils::logging::LOG_LEVEL_INFO) break; std::stringstream ss; ss << __VA_ARGS__; cv::utils::logging::internal::writeLogMessage(cv::utils::logging::LOG_LEVEL_INFO, ss.str().c_str()); break; }

§ CV_LOG_STRIP_LEVEL

#define CV_LOG_STRIP_LEVEL   CV_LOG_LEVEL_VERBOSE

Define CV_LOG_STRIP_LEVEL=CV_LOG_LEVEL_[DEBUG|INFO|WARN|ERROR|FATAL|DISABLED] to compile out anything at that and before that logging level

§ CV_LOG_VERBOSE

#define CV_LOG_VERBOSE (   tag,
  v,
  ... 
)

§ CV_LOG_WARNING

#define CV_LOG_WARNING (   tag,
  ... 
)    for(;;) { if (cv::utils::logging::getLogLevel() < cv::utils::logging::LOG_LEVEL_WARNING) break; std::stringstream ss; ss << __VA_ARGS__; cv::utils::logging::internal::writeLogMessage(cv::utils::logging::LOG_LEVEL_WARNING, ss.str().c_str()); break; }