From 3bf88d59cf34db6ef450b35815459502633b3292 Mon Sep 17 00:00:00 2001 From: rameshiyer27 Date: Tue, 25 Feb 2025 12:06:43 +0000 Subject: Add custom network logging for clamp runtime Override network logging from policy-common Excluded instance properties in kafka logs Issue-ID: POLICY-5134 Signed-off-by: rameshiyer27 Change-Id: I7d3086562f8f21701de83939e3fdae6968b2ba06 --- .../clamp/models/acm/concepts/AcElementDeploy.java | 15 ++++++++++++--- .../clamp/models/acm/concepts/AcElementRestart.java | 19 ++++++++++++++++--- 2 files changed, 28 insertions(+), 6 deletions(-) (limited to 'models') diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AcElementDeploy.java b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AcElementDeploy.java index 22f3cd830..7684fecf0 100644 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AcElementDeploy.java +++ b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AcElementDeploy.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2023-2024 Nordix Foundation. + * Copyright (C) 2023-2025 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,6 @@ import java.util.function.UnaryOperator; import lombok.Data; import lombok.NoArgsConstructor; import lombok.NonNull; -import lombok.ToString; import org.onap.policy.clamp.models.acm.messages.rest.instantiation.DeployOrder; import org.onap.policy.models.base.PfConceptKey; import org.onap.policy.models.base.PfUtils; @@ -39,7 +38,6 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; */ @NoArgsConstructor @Data -@ToString public class AcElementDeploy { @NonNull @@ -70,4 +68,15 @@ public class AcElementDeploy { this.toscaServiceTemplateFragment = otherElement.toscaServiceTemplateFragment; this.properties = PfUtils.mapMap(otherElement.properties, UnaryOperator.identity()); } + + @Override + public String toString() { + // Exclude instance properties + return "AcElementDeploy{" + + "id=" + id + + ", definition=" + definition + + ", orderedState=" + orderedState + + ", toscaServiceTemplateFragment=" + + toscaServiceTemplateFragment + '}'; + } } diff --git a/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AcElementRestart.java b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AcElementRestart.java index 687a2cfb0..4acb42ad8 100644 --- a/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AcElementRestart.java +++ b/models/src/main/java/org/onap/policy/clamp/models/acm/concepts/AcElementRestart.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2023-2024 Nordix Foundation. + * Copyright (C) 2023-2025 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,7 +27,6 @@ import java.util.function.UnaryOperator; import lombok.Data; import lombok.NoArgsConstructor; import lombok.NonNull; -import lombok.ToString; import org.onap.policy.models.base.PfConceptKey; import org.onap.policy.models.base.PfUtils; import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; @@ -35,7 +34,6 @@ import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; @NoArgsConstructor @Data -@ToString public class AcElementRestart { @NonNull @@ -82,4 +80,19 @@ public class AcElementRestart { this.outProperties = PfUtils.mapMap(otherElement.outProperties, UnaryOperator.identity()); } + @Override + public String toString() { + // Exclude instance properties + return "AcElementRestart{" + + "id=" + id + + ", definition=" + definition + + ", participantId=" + participantId + + ", deployState=" + deployState + + ", lockState=" + lockState + + ", operationalState='" + operationalState + '\'' + + ", useState='" + useState + '\'' + + ", toscaServiceTemplateFragment=" + toscaServiceTemplateFragment + + ", outProperties=" + outProperties + + '}'; + } } -- cgit