Commit e7dbc4ff authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #14782 from alalek:core_fix_log_level_default

parents b4d3ff37 6c8ffe81
...@@ -75,7 +75,7 @@ private: ...@@ -75,7 +75,7 @@ private:
}; };
LogLevel GlobalLoggingInitStruct::m_defaultUnconfiguredGlobalLevel = GlobalLoggingInitStruct::m_isDebugBuild LogLevel GlobalLoggingInitStruct::m_defaultUnconfiguredGlobalLevel = GlobalLoggingInitStruct::m_isDebugBuild
? LOG_LEVEL_DEBUG ? LOG_LEVEL_INFO
: LOG_LEVEL_WARNING; : LOG_LEVEL_WARNING;
......
...@@ -9,13 +9,13 @@ namespace cv { ...@@ -9,13 +9,13 @@ namespace cv {
namespace utils { namespace utils {
namespace logging { namespace logging {
LogTagConfigParser::LogTagConfigParser() LogTagConfigParser::LogTagConfigParser(LogLevel defaultUnconfiguredGlobalLevel)
{ {
m_parsedGlobal.namePart = "global"; m_parsedGlobal.namePart = "global";
m_parsedGlobal.isGlobal = true; m_parsedGlobal.isGlobal = true;
m_parsedGlobal.hasPrefixWildcard = false; m_parsedGlobal.hasPrefixWildcard = false;
m_parsedGlobal.hasSuffixWildcard = false; m_parsedGlobal.hasSuffixWildcard = false;
m_parsedGlobal.level = LOG_LEVEL_VERBOSE; m_parsedGlobal.level = defaultUnconfiguredGlobalLevel;
} }
LogTagConfigParser::LogTagConfigParser(const std::string& input) LogTagConfigParser::LogTagConfigParser(const std::string& input)
......
...@@ -21,7 +21,7 @@ namespace logging { ...@@ -21,7 +21,7 @@ namespace logging {
class LogTagConfigParser class LogTagConfigParser
{ {
public: public:
LogTagConfigParser(); LogTagConfigParser(LogLevel defaultUnconfiguredGlobalLevel = LOG_LEVEL_VERBOSE);
explicit LogTagConfigParser(const std::string& input); explicit LogTagConfigParser(const std::string& input);
~LogTagConfigParser(); ~LogTagConfigParser();
......
...@@ -17,7 +17,7 @@ const char* LogTagManager::m_globalName = "global"; ...@@ -17,7 +17,7 @@ const char* LogTagManager::m_globalName = "global";
LogTagManager::LogTagManager(LogLevel defaultUnconfiguredGlobalLevel) LogTagManager::LogTagManager(LogLevel defaultUnconfiguredGlobalLevel)
: m_mutex() : m_mutex()
, m_globalLogTag(new LogTag(m_globalName, defaultUnconfiguredGlobalLevel)) , 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()); assign(m_globalName, m_globalLogTag.get());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment