core: repair default log level
authorAlexander Alekhin <alexander.alekhin@intel.com>
Tue, 11 Jun 2019 16:02:31 +0000 (19:02 +0300)
committerAlexander Alekhin <alexander.alekhin@intel.com>
Tue, 11 Jun 2019 16:19:10 +0000 (19:19 +0300)
modules/core/src/logger.cpp
modules/core/src/utils/logtagconfigparser.cpp
modules/core/src/utils/logtagconfigparser.hpp
modules/core/src/utils/logtagmanager.cpp

index c16b03f..f59c788 100644 (file)
@@ -75,7 +75,7 @@ private:
 };
 
 LogLevel GlobalLoggingInitStruct::m_defaultUnconfiguredGlobalLevel = GlobalLoggingInitStruct::m_isDebugBuild
-                ? LOG_LEVEL_DEBUG
+                ? LOG_LEVEL_INFO
                 : LOG_LEVEL_WARNING;
 
 
index 2388ae8..859212d 100644 (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)
index 3db7fb6..6ff86a0 100644 (file)
@@ -21,7 +21,7 @@ namespace logging {
 class LogTagConfigParser
 {
 public:
-    LogTagConfigParser();
+    LogTagConfigParser(LogLevel defaultUnconfiguredGlobalLevel = LOG_LEVEL_VERBOSE);
     explicit LogTagConfigParser(const std::string& input);
     ~LogTagConfigParser();
 
index ff28e13..3bdb39b 100644 (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());
 }