core: set default logger level to 'warning' in Release builds

should hide unnecessary 'info' messages
pull/11692/head
Alexander Alekhin 7 years ago
parent b2cff44084
commit 4091ced5ab
  1. 8
      modules/core/src/logger.cpp

@ -21,7 +21,13 @@ namespace logging {
static LogLevel parseLogLevelConfiguration()
{
static cv::String param_log_level = utils::getConfigurationParameterString("OPENCV_LOG_LEVEL", "INFO");
static cv::String param_log_level = utils::getConfigurationParameterString("OPENCV_LOG_LEVEL",
#if defined NDEBUG
"WARNING"
#else
"INFO"
#endif
);
if (param_log_level == "DISABLED" || param_log_level == "disabled" ||
param_log_level == "0" || param_log_level == "OFF" || param_log_level == "off")
return LOG_LEVEL_SILENT;

Loading…
Cancel
Save