diff options
author | bunnei <bunneidev@gmail.com> | 2018-07-03 00:26:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-03 00:26:45 -0400 |
commit | 15e68cdbaac38bbf13cd4eb0d70d1e34b2fd4256 (patch) | |
tree | 9d072a572c0037a44e1e35aeffc242d3772a383c /src/common/param_package.cpp | |
parent | e3ca561ea0aa2e38dd1bba6757c7170448579554 (diff) | |
parent | 76b475faf774a7a357bdc707e556c75f7975bc45 (diff) |
Merge pull request #607 from jroweboy/logging
Logging - Customizable backends
Diffstat (limited to 'src/common/param_package.cpp')
-rw-r--r-- | src/common/param_package.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/param_package.cpp b/src/common/param_package.cpp index ab0154133..e0df430ab 100644 --- a/src/common/param_package.cpp +++ b/src/common/param_package.cpp @@ -25,7 +25,7 @@ ParamPackage::ParamPackage(const std::string& serialized) { std::vector<std::string> key_value; Common::SplitString(pair, KEY_VALUE_SEPARATOR, key_value); if (key_value.size() != 2) { - NGLOG_ERROR(Common, "invalid key pair {}", pair); + LOG_ERROR(Common, "invalid key pair {}", pair); continue; } @@ -64,7 +64,7 @@ std::string ParamPackage::Serialize() const { std::string ParamPackage::Get(const std::string& key, const std::string& default_value) const { auto pair = data.find(key); if (pair == data.end()) { - NGLOG_DEBUG(Common, "key '{}' not found", key); + LOG_DEBUG(Common, "key '{}' not found", key); return default_value; } @@ -74,14 +74,14 @@ std::string ParamPackage::Get(const std::string& key, const std::string& default int ParamPackage::Get(const std::string& key, int default_value) const { auto pair = data.find(key); if (pair == data.end()) { - NGLOG_DEBUG(Common, "key '{}' not found", key); + LOG_DEBUG(Common, "key '{}' not found", key); return default_value; } try { return std::stoi(pair->second); } catch (const std::logic_error&) { - NGLOG_ERROR(Common, "failed to convert {} to int", pair->second); + LOG_ERROR(Common, "failed to convert {} to int", pair->second); return default_value; } } @@ -89,14 +89,14 @@ int ParamPackage::Get(const std::string& key, int default_value) const { float ParamPackage::Get(const std::string& key, float default_value) const { auto pair = data.find(key); if (pair == data.end()) { - NGLOG_DEBUG(Common, "key {} not found", key); + LOG_DEBUG(Common, "key {} not found", key); return default_value; } try { return std::stof(pair->second); } catch (const std::logic_error&) { - NGLOG_ERROR(Common, "failed to convert {} to float", pair->second); + LOG_ERROR(Common, "failed to convert {} to float", pair->second); return default_value; } } |