PFW: Improve login in PFW core and amixer plugin
BZ: 71914
Autolog adds a nesting log level. It is not always needed. For example in a
Debug context a lot of log can be expected, so this level is useful but not
otherwise.
Autolog nesting is now optional.
Add log during PFW structure loading.
Change-Id: I24e1f615e3032c70a3b8b85a1cc1804dc49b631c
Origin-Change-Id: I1f2c6c843e17595d4a81c1d2dfbff30d4187cdf8
Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
Reviewed-on: http://android.intel.com:8080/81269
Reviewed-by: Barthes, FabienX <fabienx.barthes@intel.com>
Tested-by: Barthes, FabienX <fabienx.barthes@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Tested-by: cactus <cactus@intel.com>
diff --git a/parameter/ParameterMgr.cpp b/parameter/ParameterMgr.cpp
index cff2b47..4e6e4da 100644
--- a/parameter/ParameterMgr.cpp
+++ b/parameter/ParameterMgr.cpp
@@ -332,19 +332,21 @@
// Back synchronization for areas in parameter blackboard not covered by any domain
CBackSynchronizer* pBackSynchronizer = createBackSynchronizer(strError);
- log("Main blackboard back synchronization");
-
// Back-synchronize
- if (!pBackSynchronizer->sync()) {
+ {
+ CAutoLog autoLog(this, "Main blackboard back synchronization");
+
+ if (!pBackSynchronizer->sync()) {
+ // Get rid of back synchronizer
+ delete pBackSynchronizer;
+
+ strError = "Main blackboard back synchronization failed: " + strError;
+
+ return false;
+ }
// Get rid of back synchronizer
delete pBackSynchronizer;
-
- strError = "Main blackboard back synchronization failed: " + strError;
-
- return false;
}
- // Get rif of back synchronizer
- delete pBackSynchronizer;
// We're done loading the settings and back synchronizing
CConfigurableDomains* pConfigurableDomains = getConfigurableDomains();
@@ -420,7 +422,7 @@
// Parse Structure XML file
CXmlParameterSerializingContext parameterBuildContext(strError);
- log("Importing system structure from file %s", strXmlStructureFilePath.c_str());
+ CAutoLog autolog(pSystemClass, "Importing system structure from file " + strXmlStructureFilePath);
if (!xmlParse(parameterBuildContext, pSystemClass, strXmlStructureFilePath, strXmlStructureFolder, EParameterCreationLibrary)) {