You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ariatosca.apache.org by mx...@apache.org on 2017/12/03 12:06:34 UTC
[incubator-ariatosca] branch
ARIA-416-Providing-handlers-to-logging_handlers-only-adds-handles-instead-of-replacing
updated (3a591d7 -> fab0709)
This is an automated email from the ASF dual-hosted git repository.
mxmrlv pushed a change to branch ARIA-416-Providing-handlers-to-logging_handlers-only-adds-handles-instead-of-replacing
in repository https://gitbox.apache.org/repos/asf/incubator-ariatosca.git.
omit 3a591d7 CFY-416 Providing handlers to logging_handlers only adds handles instead of replacing
new fab0709 CFY-416 Providing handlers to logging_handlers only adds handles instead of replacing
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (3a591d7)
\
N -- N -- N refs/heads/ARIA-416-Providing-handlers-to-logging_handlers-only-adds-handles-instead-of-replacing (fab0709)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
--
To stop receiving notification emails like this one, please contact
['"commits@ariatosca.apache.org" <co...@ariatosca.apache.org>'].
[incubator-ariatosca] 01/01: CFY-416 Providing handlers to
logging_handlers only adds handles instead of replacing
Posted by mx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mxmrlv pushed a commit to branch ARIA-416-Providing-handlers-to-logging_handlers-only-adds-handles-instead-of-replacing
in repository https://gitbox.apache.org/repos/asf/incubator-ariatosca.git
commit fab0709fd2d42fab14781aece9771dbd2dc4c8ab
Author: max-orlov <ma...@gigaspaces.com>
AuthorDate: Tue Nov 28 17:20:12 2017 +0200
CFY-416 Providing handlers to logging_handlers only adds handles instead of replacing
---
aria/orchestrator/context/common.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/aria/orchestrator/context/common.py b/aria/orchestrator/context/common.py
index 3c5f618..87444a9 100644
--- a/aria/orchestrator/context/common.py
+++ b/aria/orchestrator/context/common.py
@@ -115,14 +115,19 @@ class BaseContext(object):
@contextmanager
def logging_handlers(self, handlers=None):
+ original_handlers = self.logger.handlers
handlers = handlers or []
try:
for handler in handlers:
self.logger.addHandler(handler)
+ for handler in original_handlers:
+ self.logger.removeHandler(handler)
yield self.logger
finally:
for handler in handlers:
self.logger.removeHandler(handler)
+ for handler in original_handlers:
+ self.logger.addHandler(handler)
@property
def model(self):
--
To stop receiving notification emails like this one, please contact
"commits@ariatosca.apache.org" <co...@ariatosca.apache.org>.