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 /bin | |
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 'bin')
-rwxr-xr-x | bin/run.py | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -19,15 +19,13 @@ # ECOMP is a trademark and service mark of AT&T Intellectual Property. import connexion -import sys -from config_binding_service import get_logger - -_logger = get_logger(__name__) +from config_binding_service.logging import create_logger, LOGGER if __name__ == '__main__': + create_logger() try: app = connexion.App(__name__, specification_dir='../config_binding_service/swagger/') app.add_api('swagger.yaml', arguments={'title': 'Config Binding Service'}) app.run(host='0.0.0.0', port=10000, debug=False) - except Exception as e: - _logger.error("Fatal error. Could not start webserver due to: {0}".format(e)) + except Exception as exc: + LOGGER.error("Fatal error. Could not start webserver due to: %s", exc) |