From 942f169c70d2ee9a25ffd45df1e035181bf68532 Mon Sep 17 00:00:00 2001 From: Andrei Radulescu Date: Thu, 23 Nov 2023 17:07:59 +0200 Subject: [PATCH] Extra logging in Params --- common/params.cc | 8 +++++++- common/params.h | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/common/params.cc b/common/params.cc index 54168165a176ec2..b23da19b2ea472e 100644 --- a/common/params.cc +++ b/common/params.cc @@ -282,7 +282,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..3550567329db998 100644 --- a/common/params.h +++ b/common/params.h @@ -24,7 +24,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