OpenCV  3.3.0-dev
Open Source Computer Vision
Namespaces | Macros | Enumerations
logger.hpp File Reference
#include <iostream>
#include <sstream>
#include <limits.h>

Namespaces

 utils
 
 utils::logging
 

Macros

#define CV_LOG_DEBUG(tag, ...)   for(;;) { std::stringstream ss; ss << "[DEBUG:" << cv::utils::getThreadID() << "] " << __VA_ARGS__ << std::endl; std::cout << ss.str(); break; }
 
#define CV_LOG_ERROR(tag, ...)   for(;;) { std::stringstream ss; ss << "[ERROR:" << cv::utils::getThreadID() << "] " << __VA_ARGS__ << std::endl; std::cerr << ss.str(); break; }
 
#define CV_LOG_FATAL(tag, ...)   for(;;) { std::stringstream ss; ss << "[FATAL:" << cv::utils::getThreadID() << "] " << __VA_ARGS__ << std::endl; std::cerr << ss.str(); break; }
 
#define CV_LOG_INFO(tag, ...)   for(;;) { std::stringstream ss; ss << "[ INFO:" << cv::utils::getThreadID() << "] " << __VA_ARGS__ << std::endl; std::cout << ss.str(); break; }
 
#define CV_LOG_LEVEL_DEBUG   5
 Debug message. Disabled in the "Release" build. More...
 
#define CV_LOG_LEVEL_ERROR   2
 Error message. More...
 
#define CV_LOG_LEVEL_FATAL   1
 Fatal (critical) error (unrecoverable internal error) More...
 
#define CV_LOG_LEVEL_INFO   4
 Info message. More...
 
#define CV_LOG_LEVEL_SILENT   0
 for using in setLogVevel() call More...
 
#define CV_LOG_LEVEL_VERBOSE   6
 Verbose (trace) messages. Requires verbosity level. Disabled in the "Release" build. More...
 
#define CV_LOG_LEVEL_WARN   3
 Warning message. More...
 
#define CV_LOG_STRIP_LEVEL   CV_LOG_LEVEL_VERBOSE
 
#define CV_LOG_VERBOSE(tag, v, ...)
 
#define CV_LOG_WARNING(tag, ...)   for(;;) { std::stringstream ss; ss << "[ WARN:" << cv::utils::getThreadID() << "] " << __VA_ARGS__ << std::endl; std::cout << ss.str(); break; }
 

Enumerations

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

Macro Definition Documentation

◆ CV_LOG_DEBUG

#define CV_LOG_DEBUG (   tag,
  ... 
)    for(;;) { std::stringstream ss; ss << "[DEBUG:" << cv::utils::getThreadID() << "] " << __VA_ARGS__ << std::endl; std::cout << ss.str(); break; }

◆ CV_LOG_ERROR

#define CV_LOG_ERROR (   tag,
  ... 
)    for(;;) { std::stringstream ss; ss << "[ERROR:" << cv::utils::getThreadID() << "] " << __VA_ARGS__ << std::endl; std::cerr << ss.str(); break; }

◆ CV_LOG_FATAL

#define CV_LOG_FATAL (   tag,
  ... 
)    for(;;) { std::stringstream ss; ss << "[FATAL:" << cv::utils::getThreadID() << "] " << __VA_ARGS__ << std::endl; std::cerr << ss.str(); break; }

◆ CV_LOG_INFO

#define CV_LOG_INFO (   tag,
  ... 
)    for(;;) { std::stringstream ss; ss << "[ INFO:" << cv::utils::getThreadID() << "] " << __VA_ARGS__ << std::endl; std::cout << ss.str(); break; }

◆ CV_LOG_LEVEL_DEBUG

#define CV_LOG_LEVEL_DEBUG   5

Debug message. Disabled in the "Release" build.

◆ CV_LOG_LEVEL_ERROR

#define CV_LOG_LEVEL_ERROR   2

Error message.

◆ CV_LOG_LEVEL_FATAL

#define CV_LOG_LEVEL_FATAL   1

Fatal (critical) error (unrecoverable internal error)

◆ CV_LOG_LEVEL_INFO

#define CV_LOG_LEVEL_INFO   4

Info message.

◆ CV_LOG_LEVEL_SILENT

#define CV_LOG_LEVEL_SILENT   0

for using in setLogVevel() call

◆ CV_LOG_LEVEL_VERBOSE

#define CV_LOG_LEVEL_VERBOSE   6

Verbose (trace) messages. Requires verbosity level. Disabled in the "Release" build.

◆ CV_LOG_LEVEL_WARN

#define CV_LOG_LEVEL_WARN   3

Warning message.

◆ 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(;;) { std::stringstream ss; ss << "[ WARN:" << cv::utils::getThreadID() << "] " << __VA_ARGS__ << std::endl; std::cout << ss.str(); break; }