Skip to content

Commit

Permalink
core: set default logger level to 'warning' in Release builds
Browse files Browse the repository at this point in the history
should hide unnecessary 'info' messages
  • Loading branch information
alalek committed Jun 5, 2018
1 parent b2cff44 commit 4091ced
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/core/src/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4091ced

Please sign in to comment.