diff options
author | helenyao <yaohelan@huawei.com> | 2017-01-05 01:57:01 -0500 |
---|---|---|
committer | helenyao <yaohelan@huawei.com> | 2017-01-19 04:36:48 -0500 |
commit | 168502f9fa58d9c348adb563b705d17c5ec4dcf7 (patch) | |
tree | 2469a15f448beacbc7059eb719a4225d06623da0 /functest/tests/unit/test_logging.ini | |
parent | 34aab533f4a6c20676eb2a2b6843d5980ea3ac17 (diff) |
Leverage logging config and refactor the logger
JIRA: FUNCTEST-690
The detailed benefits are listed in the JIRA description.
1. Refactored the functest_logger to make use of configuration file
2. Avoided configuring the logging every time a logger is initialized
3. Applied separate logging configuration fo unit test by removing
saving log to file
Change-Id: I6e27eaba727ae6d704f0301f15359dc3ea7b2f97
Signed-off-by: helenyao <yaohelan@huawei.com>
Diffstat (limited to 'functest/tests/unit/test_logging.ini')
-rw-r--r-- | functest/tests/unit/test_logging.ini | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/functest/tests/unit/test_logging.ini b/functest/tests/unit/test_logging.ini new file mode 100644 index 00000000..3d5b947c --- /dev/null +++ b/functest/tests/unit/test_logging.ini @@ -0,0 +1,27 @@ +[loggers]
+keys=root,functest_logger
+
+[logger_root]
+level=DEBUG
+handlers=console
+
+[logger_functest_logger]
+level=DEBUG
+handlers=console
+qualname=functest.utils.functest_logger
+propagate=0
+
+[handlers]
+keys=console
+
+[handler_console]
+class=StreamHandler
+level=INFO
+formatter=standard
+args=(sys.stdout,)
+
+[formatters]
+keys=standard
+
+[formatter_standard]
+format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
\ No newline at end of file |