From e011cf052edad0e70ce2846d483fa29f6283bef3 Mon Sep 17 00:00:00 2001 From: SrikanthNaidu Date: Wed, 19 Dec 2018 19:06:39 +0530 Subject: heartbeat service Logging complaince All components deployed should conform to ONAP logging guidelines Issue-ID: DCAEGEN2-628 Change-Id: I2febe2456033f3aa2961fcb2f656b64b1515cd03 Signed-off-by: SrikanthNaidu --- miss_htbt_service/mod/trapd_get_cbs_config.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'miss_htbt_service/mod/trapd_get_cbs_config.py') diff --git a/miss_htbt_service/mod/trapd_get_cbs_config.py b/miss_htbt_service/mod/trapd_get_cbs_config.py index d2b615f..47ba223 100644 --- a/miss_htbt_service/mod/trapd_get_cbs_config.py +++ b/miss_htbt_service/mod/trapd_get_cbs_config.py @@ -58,9 +58,9 @@ def get_cbs_config(): # See if we are in a config binding service (CBS) /controller environment try: + msg = "Unable to fetch CBS config or it is erroneously empty - trying override/simulator config" tds.c_config = get_config() if tds.c_config == {}: - msg = "Unable to fetch CBS config or it is erroneously empty - trying override/simulator config" stdout_logger(msg) # if no CBS present, default to JSON config specified via CBS_HTBT_JSON env var @@ -69,15 +69,15 @@ def get_cbs_config(): stdout_logger(msg) try: + msg = "CBS_HTBT_JSON not defined - FATAL ERROR, exiting" _cbs_sim_json_file = os.getenv("CBS_HTBT_JSON", "None") except Exception as e: - msg = "CBS_HTBT_JSON not defined - FATAL ERROR, exiting" stdout_logger(msg) cleanup(1,None) return False + msg = "CBS_HTBT_JSON not defined - FATAL ERROR, exiting" if _cbs_sim_json_file == "None": - msg = "CBS_HTBT_JSON not defined - FATAL ERROR, exiting" stdout_logger(msg) cleanup(1,None) return False @@ -85,11 +85,11 @@ def get_cbs_config(): msg = ("ONAP controller override specified via CBS_HTBT_JSON: %s" % _cbs_sim_json_file) stdout_logger(msg) + msg = "Unable to load CBS_HTBT_JSON " + _cbs_sim_json_file + \ + " (invalid json?) - FATAL ERROR, exiting" try: tds.c_config = json.load(open(_cbs_sim_json_file)) except Exception as e: - msg = "Unable to load CBS_HTBT_JSON " + _cbs_sim_json_file + \ - " (invalid json?) - FATAL ERROR, exiting" stdout_logger(msg) cleanup_and_exit(0,None) -- cgit 1.2.3-korg