summaryrefslogtreecommitdiffstats
path: root/parameter/Element.cpp
diff options
context:
space:
mode:
authorKevin Rocard <kevinx.rocard@intel.com>2013-02-04 14:57:47 +0100
committerDavid Wagner <david.wagner@intel.com>2014-02-12 17:03:46 +0100
commit3629936c927edb75d2529ff82395f735375d4650 (patch)
tree633925eb1d0ba622aea4a533021674830841e5e5 /parameter/Element.cpp
parent22a6cef89ab708fff985ded34031a5d48fbd5236 (diff)
downloadexternal_parameter-framework-3629936c927edb75d2529ff82395f735375d4650.zip
external_parameter-framework-3629936c927edb75d2529ff82395f735375d4650.tar.gz
external_parameter-framework-3629936c927edb75d2529ff82395f735375d4650.tar.bz2
PFW: Correct truncated criterion log
BZ: 85746 Create a log fonction to log a string table. Use it to call the log function for each criterion. Context: When the PFW starts, it logs the criteria, their states and possible values. All criterion logs where concatenate in a string and logged. But if there is a lot of criteria, the 512 chars long log buffer might be overfload and the log is truncated. Change-Id: I72c89b25de9314b714763b3ac71a7d0cb9698910 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/90089 Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'parameter/Element.cpp')
-rw-r--r--parameter/Element.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/parameter/Element.cpp b/parameter/Element.cpp
index 06c3df2..a96c683 100644
--- a/parameter/Element.cpp
+++ b/parameter/Element.cpp
@@ -69,6 +69,19 @@ void CElement::log_warning(const string& strMessage, ...) const
doLog(true, acBuffer);
}
+// Log each element of the string list
+void CElement::log_table(bool bIsWarning, const list<string> lstrMessage) const
+{
+ list<string>::const_iterator iterator(lstrMessage.begin());
+ list<string>::const_iterator end(lstrMessage.end());
+
+ while (iterator != end) {
+ // Log current list element
+ doLog(bIsWarning, iterator->c_str());
+ ++iterator;
+ }
+}
+
void CElement::doLog(bool bIsWarning, const string& strLog) const
{
assert(_pParent);