Merge pull request #14782 from alalek:core_fix_log_level_default

pull/14785/head
Alexander Alekhin 6 years ago
commit e7dbc4ff28
  1. 2
      modules/core/src/logger.cpp
  2. 4
      modules/core/src/utils/logtagconfigparser.cpp
  3. 2
      modules/core/src/utils/logtagconfigparser.hpp
  4. 2
      modules/core/src/utils/logtagmanager.cpp

@ -75,7 +75,7 @@ private:
};
LogLevel GlobalLoggingInitStruct::m_defaultUnconfiguredGlobalLevel = GlobalLoggingInitStruct::m_isDebugBuild
? LOG_LEVEL_DEBUG
? LOG_LEVEL_INFO
: LOG_LEVEL_WARNING;

@ -9,13 +9,13 @@ namespace cv {
namespace utils {
namespace logging {
LogTagConfigParser::LogTagConfigParser()
LogTagConfigParser::LogTagConfigParser(LogLevel defaultUnconfiguredGlobalLevel)
{
m_parsedGlobal.namePart = "global";
m_parsedGlobal.isGlobal = true;
m_parsedGlobal.hasPrefixWildcard = false;
m_parsedGlobal.hasSuffixWildcard = false;
m_parsedGlobal.level = LOG_LEVEL_VERBOSE;
m_parsedGlobal.level = defaultUnconfiguredGlobalLevel;
}
LogTagConfigParser::LogTagConfigParser(const std::string& input)

@ -21,7 +21,7 @@ namespace logging {
class LogTagConfigParser
{
public:
LogTagConfigParser();
LogTagConfigParser(LogLevel defaultUnconfiguredGlobalLevel = LOG_LEVEL_VERBOSE);
explicit LogTagConfigParser(const std::string& input);
~LogTagConfigParser();

@ -17,7 +17,7 @@ const char* LogTagManager::m_globalName = "global";
LogTagManager::LogTagManager(LogLevel defaultUnconfiguredGlobalLevel)
: m_mutex()
, m_globalLogTag(new LogTag(m_globalName, defaultUnconfiguredGlobalLevel))
, m_config(std::make_shared<LogTagConfigParser>())
, m_config(std::make_shared<LogTagConfigParser>(defaultUnconfiguredGlobalLevel))
{
assign(m_globalName, m_globalLogTag.get());
}

Loading…
Cancel
Save