diff options
author | 2020-10-22 19:02:27 +0800 | |
---|---|---|
committer | 2020-10-22 19:02:45 +0800 | |
commit | 8fe3168b910b5088d4874890961a26792b6d7325 (patch) | |
tree | 1d721f383b792d34f5173754b478b8694eb5c7c6 /holmes-actions/src/main/java | |
parent | 59d22c8f5ed81e1221ee6e9c5364a8baf5bc3a20 (diff) |
Added Some Debugging Logs
Change-Id: I15bb6ada02424a65884522e4a2727fac29d2162a
Issue-ID: HOLMES-369
Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'holmes-actions/src/main/java')
-rw-r--r-- | holmes-actions/src/main/java/org/onap/holmes/common/dcae/DcaeConfigurationsCache.java | 5 | ||||
-rw-r--r-- | holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/dcae/DcaeConfigurationsCache.java b/holmes-actions/src/main/java/org/onap/holmes/common/dcae/DcaeConfigurationsCache.java index 2503ce2..2dd5ac5 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/dcae/DcaeConfigurationsCache.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/dcae/DcaeConfigurationsCache.java @@ -18,6 +18,7 @@ package org.onap.holmes.common.dcae; import lombok.extern.slf4j.Slf4j; import org.onap.holmes.common.dcae.entity.DcaeConfigurations; import org.onap.holmes.common.dcae.entity.SecurityInfo; +import org.onap.holmes.common.utils.GsonUtil; @Slf4j public class DcaeConfigurationsCache { @@ -40,4 +41,8 @@ public class DcaeConfigurationsCache { public synchronized static void setDcaeConfigurations(DcaeConfigurations configurations) { dcaeConfigurations = configurations; } + + public synchronized static String getDcaeConfigurations() { + return GsonUtil.beanToJson(dcaeConfigurations); + } } diff --git a/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java b/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java index f29f1d9..7e33bf9 100644 --- a/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java +++ b/holmes-actions/src/main/java/org/onap/holmes/common/dmaap/DmaapService.java @@ -71,7 +71,8 @@ public class DmaapService { } catch (CorrelationException e) { log.error("Failed to publish the control loop event to DMaaP", e); } catch (NullPointerException e) { - log.error("DMaaP configurations do not exist!"); + log.error(String.format("DMaaP configurations do not exist!\n DCAE Configurations: \n %s", + DcaeConfigurationsCache.getDcaeConfigurations()), e); } } |