Merge pull request #14782 from alalek:core_fix_log_level_default

This commit is contained in:
Alexander Alekhin 2019-06-11 20:11:32 +00:00
commit e7dbc4ff28
4 changed files with 5 additions and 5 deletions

View File

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

View File

@ -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)

View File

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

View File

@ -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());
}