summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/xmlGenerator/domainGenerator.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/xmlGenerator/domainGenerator.py b/tools/xmlGenerator/domainGenerator.py
index 83c71ea..516a3bd 100755
--- a/tools/xmlGenerator/domainGenerator.py
+++ b/tools/xmlGenerator/domainGenerator.py
@@ -108,6 +108,15 @@ class PfwTranslationErrorHandler:
def hasFailed(self):
return self._hasFailed
+class PfwLogger(PyPfw.ILogger):
+ def __init__(self):
+ super(PfwLogger, self).__init__()
+ self.__logger = logging.root.getChild("parameter-framework")
+
+ def log(self, is_warning, message):
+ log_func = self.__logger.warning if is_warning else self.__logger.info
+ log_func(message)
+
# If this file is directly executed
if __name__ == "__main__":
logging.root.setLevel(logging.INFO)
@@ -263,6 +272,9 @@ if __name__ == "__main__":
schemas_dir = os.path.join(install_path, "Schemas")
pfw.setSchemaFolderLocation(schemas_dir)
+ logger = PfwLogger()
+ pfw.setLogger(logger)
+
# Finally, start the Pfw
ok, error = pfw.start()
if not ok: