You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by av...@apache.org on 2017/03/30 11:07:19 UTC
[2/2] incubator-ariatosca git commit: Add NullHandlers handlers to
Storage loggers
Add NullHandlers handlers to Storage loggers
This is since the absence of a handler shows up while using the CLI in
the form of: `No handlers could be found for logger "aria.ResourceStorage"`
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/0833c0d3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/0833c0d3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/0833c0d3
Branch: refs/heads/avia-cli
Commit: 0833c0d397c1e017a568ffe40954b0355a045f6b
Parents: cadc6aa
Author: Avia Efrat <av...@gigaspaces.com>
Authored: Thu Mar 30 14:05:46 2017 +0300
Committer: Avia Efrat <av...@gigaspaces.com>
Committed: Thu Mar 30 14:05:46 2017 +0300
----------------------------------------------------------------------
aria/storage/core.py | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/0833c0d3/aria/storage/core.py
----------------------------------------------------------------------
diff --git a/aria/storage/core.py b/aria/storage/core.py
index 8302fc9..0e900bb 100644
--- a/aria/storage/core.py
+++ b/aria/storage/core.py
@@ -37,6 +37,7 @@ API:
* drivers - module, a pool of ARIA standard drivers.
* StorageDriver - class, abstract model implementation.
"""
+import logging
from aria.logger import LoggerMixin
from . import sql_mapi
@@ -71,6 +72,10 @@ class Storage(LoggerMixin):
:param kwargs:
"""
super(Storage, self).__init__(**kwargs)
+ # Set the logger handler of any storage object to NullHandler.
+ # This is since the absence of a handler shows up while using the CLI in the form of:
+ # `No handlers could be found for logger "aria.ResourceStorage"`.
+ self.logger.addHandler(logging.NullHandler())
self.api = api_cls
self.registered = {}
self._initiator = initiator