diff options
author | Tommy Carpenter <tommy@research.att.com> | 2018-03-09 10:41:05 -0500 |
---|---|---|
committer | Tommy Carpenter <tommy@research.att.com> | 2018-03-11 11:14:57 -0400 |
commit | 226719d5b23c7b82940a0e4c5b6922eead419788 (patch) | |
tree | f1bb5016e6842a4c2cf78231e6ca53d3c41b8c24 /config_binding_service/__init__.py | |
parent | 914d8ccb42befc04ec5b759dd84b242591bb5e91 (diff) |
Implement logging that can get to ELK
This adds more logging into the front end, and also logs to a file so
ELK can get them.
All public calls to the CBS are logged with the return code.
This is not to say logging is completed in the CBS, more may come later
and under a more structured format.
Change-Id: I63c966876972e06c51276eaf1204b5b9b9e6cea7
Issue-ID: DCAEGEN2-387
Signed-off-by: Tommy Carpenter <tommy@research.att.com>
Diffstat (limited to 'config_binding_service/__init__.py')
-rw-r--r-- | config_binding_service/__init__.py | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/config_binding_service/__init__.py b/config_binding_service/__init__.py index 2835511..5a6b081 100644 --- a/config_binding_service/__init__.py +++ b/config_binding_service/__init__.py @@ -17,17 +17,6 @@ # ECOMP is a trademark and service mark of AT&T Intellectual Property. import os -import logging - -# Configures the module root logger -root = logging.getLogger() -if root.handlers: - root.handlers.clear() -formatter = logging.Formatter('%(asctime)s | %(name)s | %(module)s | %(funcName)s | %(lineno)d | %(levelname)s | %(message)s') -handler = logging.StreamHandler() -handler.setFormatter(formatter) -root.addHandler(handler) -root.setLevel("DEBUG") class BadEnviornmentENVNotFound(Exception): @@ -37,11 +26,6 @@ class BadEnviornmentENVNotFound(Exception): pass -def get_logger(module=None): - '''Returns a module-specific logger or global logger if the module is None''' - return root if module is None else root.getChild(module) - - def get_consul_uri(): """ This method waterfalls reads an envioronmental variable called CONSUL_HOST |