From 08b9711d68bb7d324d7e8c321ae726a86830d19a Mon Sep 17 00:00:00 2001 From: HanishKVC Date: Wed, 1 May 2024 00:50:52 +0530 Subject: [PATCH] SimpCfg:Remove dbug logs wrt str_tolower and set_bool Also the warning wrt is it string, now also logs the line number, group and key, to help user identify the line better. Misc: pass time last week Another life, Anchakkallakokkan, Deadloch --- common/simpcfg.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/common/simpcfg.hpp b/common/simpcfg.hpp index b3b53db56..673e62f55 100644 --- a/common/simpcfg.hpp +++ b/common/simpcfg.hpp @@ -119,7 +119,7 @@ public: void set_bool(const std::string &group, const std::string &key, const std::string &value) { std::string sValue = str_tolower(value); bool bValue = sValue == "true" ? true : false; - LDBUG_LN("DBUG:%s:%s:%s:%d", __func__, value.c_str(), sValue.c_str(), bValue); + //LDBUG_LN("DBUG:%s:%s:%s:%d", __func__, value.c_str(), sValue.c_str(), bValue); set_bool(group, key, bValue); } @@ -229,9 +229,6 @@ public: value = str_trim(value, ","); std::string vtype = "bool"; auto valueLower = str_tolower(value); - LDBUG_LN("DBUG:%s:BoolCheck:%s:%s", __func__, value.c_str(), valueLower.c_str()); - str_compare_dump(value, valueLower); - str_compare_dump(valueLower, "true"); if ((valueLower.compare("true") == 0) || (valueLower.compare("false") == 0)) { set_bool(group, key, value); } else if (std::regex_match(value, rInt)) { @@ -243,12 +240,12 @@ public: } else { vtype = "string"; if (!value.empty() && (value.front() != '"')) { - LWARN_LN("WARN:SC:%s:kv:is this string:%s", __func__, value.c_str()); + LWARN_LN("WARN:SC:%s:%d:%s:k:%s:v:%s:is this string?", __func__, iLine, group.c_str(), key.c_str(), value.c_str()); } value = str_trim_single(value, "\""); set_string(group, key, value); } - //LDBUG_LN("DBUG:SC:%s:kv:%s:%s:%s:%s", __func__, group.c_str(), key.c_str(), vtype.c_str(), value.c_str()); + //LDBUG_LN("DBUG:SC:%s:%d:kv:%s:%s:%s:%s", __func__, iLine, group.c_str(), key.c_str(), vtype.c_str(), value.c_str()); } }