From 6c8ffe81d0bccc61fab9128a34c4114ac740b9d1 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 11 Jun 2019 19:02:31 +0300 Subject: [PATCH] core: repair default log level --- modules/core/src/logger.cpp | 2 +- modules/core/src/utils/logtagconfigparser.cpp | 4 ++-- modules/core/src/utils/logtagconfigparser.hpp | 2 +- modules/core/src/utils/logtagmanager.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/core/src/logger.cpp b/modules/core/src/logger.cpp index c16b03fe29..f59c78867c 100644 --- a/modules/core/src/logger.cpp +++ b/modules/core/src/logger.cpp @@ -75,7 +75,7 @@ private: }; LogLevel GlobalLoggingInitStruct::m_defaultUnconfiguredGlobalLevel = GlobalLoggingInitStruct::m_isDebugBuild - ? LOG_LEVEL_DEBUG + ? LOG_LEVEL_INFO : LOG_LEVEL_WARNING; diff --git a/modules/core/src/utils/logtagconfigparser.cpp b/modules/core/src/utils/logtagconfigparser.cpp index 2388ae8e34..859212d7af 100644 --- a/modules/core/src/utils/logtagconfigparser.cpp +++ b/modules/core/src/utils/logtagconfigparser.cpp @@ -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) diff --git a/modules/core/src/utils/logtagconfigparser.hpp b/modules/core/src/utils/logtagconfigparser.hpp index 3db7fb668c..6ff86a03e6 100644 --- a/modules/core/src/utils/logtagconfigparser.hpp +++ b/modules/core/src/utils/logtagconfigparser.hpp @@ -21,7 +21,7 @@ namespace logging { class LogTagConfigParser { public: - LogTagConfigParser(); + LogTagConfigParser(LogLevel defaultUnconfiguredGlobalLevel = LOG_LEVEL_VERBOSE); explicit LogTagConfigParser(const std::string& input); ~LogTagConfigParser(); diff --git a/modules/core/src/utils/logtagmanager.cpp b/modules/core/src/utils/logtagmanager.cpp index ff28e13e25..3bdb39b3a2 100644 --- a/modules/core/src/utils/logtagmanager.cpp +++ b/modules/core/src/utils/logtagmanager.cpp @@ -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()) + , m_config(std::make_shared(defaultUnconfiguredGlobalLevel)) { assign(m_globalName, m_globalLogTag.get()); }