diff --git a/common/params.cc b/common/params.cc index 54168165a176ec2..d0133bca06fca2a 100644 --- a/common/params.cc +++ b/common/params.cc @@ -7,7 +7,6 @@ #include #include -#include "common/swaglog.h" #include "common/util.h" #include "system/hardware/hw.h" @@ -282,7 +281,13 @@ int Params::remove(const std::string &key) { std::string Params::get(const std::string &key, bool block) { if (!block) { - return util::read_file(getParamPath(key)); + std::string value = util::read_file(getParamPath(key)); + + if (strcmp(key, "GsmApn") == 0) { + LOGE("Params::get %s: %s", key, value); + } + + return value; } else { // blocking read until successful params_do_exit = 0; diff --git a/common/params.h b/common/params.h index fbe0bba6b0da3c6..431e7060bc1b1c3 100644 --- a/common/params.h +++ b/common/params.h @@ -4,6 +4,8 @@ #include #include +#include "common/swaglog.h" + enum ParamKeyType { PERSISTENT = 0x02, CLEAR_ON_MANAGER_START = 0x04, @@ -24,7 +26,13 @@ class Params { bool checkKey(const std::string &key); ParamKeyType getKeyType(const std::string &key); inline std::string getParamPath(const std::string &key = {}) { - return params_path + prefix + (key.empty() ? "" : "/" + key); + std::string path = params_path + prefix + (key.empty() ? "" : "/" + key); + + if (strcmp(key, "GsmApn") == 0) { + LOGE("Params path: %s", path); + } + + return path; } // Delete a value