From 3629936c927edb75d2529ff82395f735375d4650 Mon Sep 17 00:00:00 2001 From: Kevin Rocard Date: Mon, 4 Feb 2013 14:57:47 +0100 Subject: 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 Reviewed-on: http://android.intel.com:8080/90089 Reviewed-by: Gonzalve, Sebastien Tested-by: Dixon, CharlesX Reviewed-by: buildbot Tested-by: buildbot --- parameter/Element.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'parameter/Element.cpp') 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 lstrMessage) const +{ + list::const_iterator iterator(lstrMessage.begin()); + list::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); -- cgit v1.1