Renamed debug logging param

This commit is contained in:
Nav
2023-09-23 21:48:55 +01:00
parent 7d588b6077
commit 0851da3a7a
3 changed files with 8 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
#include <iostream> #include <iostream>
void Logger::configure(const ProjectConfig& projectConfig) { void Logger::configure(const ProjectConfig& projectConfig) {
if (projectConfig.debugLoggingEnabled) { if (projectConfig.debugLogging) {
Logger::debugPrintingEnabled = true; Logger::debugPrintingEnabled = true;
Logger::debug("Debug log printing has been enabled"); Logger::debug("Debug log printing has been enabled");
} }

View File

@@ -71,8 +71,13 @@ ProjectConfig::ProjectConfig(const YAML::Node& configNode) {
this->insightConfig = InsightConfig(configNode["insight"]); this->insightConfig = InsightConfig(configNode["insight"]);
} }
// Old param name, will remove later
if (configNode["debugLoggingEnabled"]) { if (configNode["debugLoggingEnabled"]) {
this->debugLoggingEnabled = configNode["debugLoggingEnabled"].as<bool>(this->debugLoggingEnabled); this->debugLogging = configNode["debugLoggingEnabled"].as<bool>(this->debugLogging);
}
if (configNode["debugLogging"]) {
this->debugLogging = configNode["debugLogging"].as<bool>(this->debugLogging);
} }
} }

View File

@@ -234,7 +234,7 @@ struct ProjectConfig
*/ */
InsightConfig insightConfig = InsightConfig(); InsightConfig insightConfig = InsightConfig();
bool debugLoggingEnabled = false; bool debugLogging = false;
/** /**
* Obtains config parameters from YAML node. * Obtains config parameters from YAML node.