ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxm...@apache.org
Subject [07/18] incubator-ariatosca git commit: moved TASK_LOG_NAME
Date Mon, 10 Apr 2017 09:51:16 GMT
moved TASK_LOG_NAME


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/2ab146e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/2ab146e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/2ab146e3

Branch: refs/heads/logger_task
Commit: 2ab146e394b2cae207e6db06a86e070660d0396f
Parents: 4275d21
Author: Ran Ziv <ran@gigaspaces.com>
Authored: Thu Apr 6 16:18:07 2017 +0300
Committer: Ran Ziv <ran@gigaspaces.com>
Committed: Thu Apr 6 16:18:07 2017 +0300

----------------------------------------------------------------------
 aria/logger.py                      | 3 +++
 aria/orchestrator/context/common.py | 6 ++----
 tests/conftest.py                   | 4 ++--
 3 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2ab146e3/aria/logger.py
----------------------------------------------------------------------
diff --git a/aria/logger.py b/aria/logger.py
index e3039f5..bbb6c7a 100644
--- a/aria/logger.py
+++ b/aria/logger.py
@@ -21,6 +21,9 @@ import logging
 from logging import handlers as logging_handlers
 from datetime import datetime
 
+TASK_LOGGER_NAME = 'aria.executions.task'
+
+
 _base_logger = logging.getLogger('aria')
 
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2ab146e3/aria/orchestrator/context/common.py
----------------------------------------------------------------------
diff --git a/aria/orchestrator/context/common.py b/aria/orchestrator/context/common.py
index 61ef9c0..11b5eb9 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -29,12 +29,10 @@ from aria import (
 )
 from aria.storage import exceptions
 
+from ... import logger
 from ...utils.uuid import generate_uuid
 
 
-TASK_LOGGER_NAME = 'aria.executions.task'
-
-
 class BaseContext(object):
     """
     Base context object for workflow and operation
@@ -72,7 +70,7 @@ class BaseContext(object):
 
     def _register_logger(self, level=None, task_id=None):
         self.logger = self.PrefixedLogger(
-            logging.getLogger(TASK_LOGGER_NAME), self.logging_id, task_id=task_id)
+            logging.getLogger(logger.TASK_LOGGER_NAME), self.logging_id, task_id=task_id)
         self.logger.setLevel(level or logging.DEBUG)
         if not self.logger.handlers:
             self.logger.addHandler(aria_logger.create_console_log_handler())

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2ab146e3/tests/conftest.py
----------------------------------------------------------------------
diff --git a/tests/conftest.py b/tests/conftest.py
index e604eb8..312ee0b 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -18,7 +18,7 @@ import logging
 import pytest
 
 import aria
-from aria.orchestrator.context import common
+from aria import logger
 
 
 @pytest.fixture(scope='session', autouse=True)
@@ -38,5 +38,5 @@ def logging_handler_cleanup(request):
     :return:
     """
     def clear_logging_handlers():
-        logging.getLogger(common.TASK_LOGGER_NAME).handlers = []
+        logging.getLogger(logger.TASK_LOGGER_NAME).handlers = []
     request.addfinalizer(clear_logging_handlers)


Mime
View raw message