diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/clamp/clds/tosca/update/execution/ToscaMetadataExecutor.java | 5 | ||||
-rw-r--r-- | src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java | 15 | ||||
-rw-r--r-- | src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java | 23 | ||||
-rw-r--r-- | src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java | 38 | ||||
-rw-r--r-- | src/main/resources/META-INF/resources/swagger.html | 6 | ||||
-rw-r--r-- | src/main/resources/application-noaaf.properties | 1 | ||||
-rw-r--r-- | src/main/resources/application.properties | 2 | ||||
-rw-r--r-- | src/main/resources/clds/camel/rest/clamp-api-v2.xml | 435 | ||||
-rw-r--r-- | src/main/resources/logback-default.xml | 103 | ||||
-rw-r--r-- | src/main/resources/logback-spring.xml (renamed from src/main/resources/logback.xml) | 0 |
11 files changed, 428 insertions, 202 deletions
diff --git a/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java b/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java index 1261a5e95..d20a7370c 100644 --- a/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java +++ b/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java @@ -53,7 +53,7 @@ import org.springframework.security.crypto.password.PasswordEncoder; public class DefaultUserConfiguration extends WebSecurityConfigurerAdapter { protected static final EELFLogger logger = EELFManager.getInstance().getLogger(DefaultUserConfiguration.class); - protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger(); + private static final String SETUP_WEB_USERS_EXCEPTION_MSG = "Exception occurred during the " + " setup of the Web users in memory"; @Autowired diff --git a/src/main/java/org/onap/clamp/clds/tosca/update/execution/ToscaMetadataExecutor.java b/src/main/java/org/onap/clamp/clds/tosca/update/execution/ToscaMetadataExecutor.java index 924011901..885e755bd 100644 --- a/src/main/java/org/onap/clamp/clds/tosca/update/execution/ToscaMetadataExecutor.java +++ b/src/main/java/org/onap/clamp/clds/tosca/update/execution/ToscaMetadataExecutor.java @@ -51,7 +51,7 @@ public class ToscaMetadataExecutor { private Map<String, ToscaMetadataProcess> mapOfProcesses = new HashMap<>(); /** - * This method executes the required process specified in processInfo + * This method executes the required process specified in processInfo. * * @param processInfo A String containing the process to execute, like "cds/param1:value1/param2:value2" * @param childObject The jsonObject @@ -61,7 +61,8 @@ public class ToscaMetadataExecutor { String[] processParameters = (processInfo + "/ ").split("/"); logger.info("Executing the Tosca clamp process " + processParameters[0] + " with parameters " + processParameters[1].trim()); - mapOfProcesses.get(processParameters[0]).executeProcess(processParameters[1].trim(), childObject, serviceModel); + mapOfProcesses.get(processParameters[0].trim()) + .executeProcess(processParameters[1].trim(), childObject, serviceModel); } /** diff --git a/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java b/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java index 8fce5cafd..8b8547195 100644 --- a/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java +++ b/src/main/java/org/onap/clamp/loop/components/external/DcaeComponent.java @@ -23,6 +23,8 @@ package org.onap.clamp.loop.components.external; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; import com.google.gson.JsonObject; import java.util.Iterator; @@ -30,6 +32,7 @@ import java.util.LinkedList; import java.util.List; import java.util.UUID; +import javax.persistence.Transient; import org.apache.camel.Exchange; import org.json.simple.JSONArray; import org.json.simple.JSONObject; @@ -43,11 +46,14 @@ import org.onap.clamp.policy.microservice.MicroServicePolicy; public class DcaeComponent extends ExternalComponent { + @Transient + private static final EELFLogger logger = EELFManager.getInstance().getLogger(DcaeComponent.class); + private static final String DCAE_DEPLOYMENT_PREFIX = "CLAMP_"; private static final String DEPLOYMENT_PARAMETER = "dcaeDeployParameters"; private static final String DCAE_SERVICETYPE_ID = "serviceTypeId"; private static final String DCAE_INPUTS = "inputs"; - private static final String SINGLE_BLUEPRINT_POLICYID = "loop template blueprint"; + public static final String UNIQUE_BLUEPRINT_PARAMETERS = "uniqueBlueprintParameters"; private String name; @@ -132,7 +138,8 @@ public class DcaeComponent extends ExternalComponent { */ public static String getDeployPayload(Loop loop) { JsonObject globalProp = loop.getGlobalPropertiesJson(); - JsonObject deploymentProp = globalProp.getAsJsonObject(DEPLOYMENT_PARAMETER).getAsJsonObject(SINGLE_BLUEPRINT_POLICYID); + JsonObject deploymentProp = globalProp.getAsJsonObject(DEPLOYMENT_PARAMETER).getAsJsonObject( + UNIQUE_BLUEPRINT_PARAMETERS); String serviceTypeId = loop.getLoopTemplate().getDcaeBlueprintId(); @@ -141,6 +148,7 @@ public class DcaeComponent extends ExternalComponent { if (deploymentProp != null) { rootObject.add(DCAE_INPUTS, deploymentProp); } + logger.info("DCAE Deploy payload for unique blueprint: " + rootObject.toString()); return rootObject.toString(); } @@ -163,6 +171,7 @@ public class DcaeComponent extends ExternalComponent { if (deploymentProp != null) { rootObject.add(DCAE_INPUTS, deploymentProp); } + logger.info("DCAE Deploy payload for multiple blueprints: " + rootObject.toString()); return rootObject.toString(); } @@ -175,6 +184,7 @@ public class DcaeComponent extends ExternalComponent { public static String getUndeployPayload(Loop loop) { JsonObject rootObject = new JsonObject(); rootObject.addProperty(DCAE_SERVICETYPE_ID, loop.getLoopTemplate().getDcaeBlueprintId()); + logger.info("DCAE Undeploy payload for unique blueprint: " + rootObject.toString()); return rootObject.toString(); } @@ -187,6 +197,7 @@ public class DcaeComponent extends ExternalComponent { public static String getUndeployPayload(MicroServicePolicy policy) { JsonObject rootObject = new JsonObject(); rootObject.addProperty(DCAE_SERVICETYPE_ID, policy.getDcaeBlueprintId()); + logger.info("DCAE Undeploy payload for multiple blueprints: " + rootObject.toString()); return rootObject.toString(); } diff --git a/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java b/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java index 2d7b807c0..f963e3514 100644 --- a/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java +++ b/src/main/java/org/onap/clamp/loop/components/external/PolicyComponent.java @@ -81,13 +81,13 @@ public class PolicyComponent extends ExternalComponent { public static String createPoliciesPayloadPdpGroup(Loop loop) { HashMap<String, HashMap<String, List<JsonObject>>> pdpGroupMap = new HashMap<>(); for (OperationalPolicy opPolicy : loop.getOperationalPolicies()) { - pdpGroupMap = updatePdpGroupMap(opPolicy.getPdpGroup(), opPolicy.getPdpSubgroup(), + updatePdpGroupMap(opPolicy.getPdpGroup(), opPolicy.getPdpSubgroup(), opPolicy.getName(), opPolicy.getPolicyModel().getVersion(), pdpGroupMap); } for (MicroServicePolicy msPolicy : loop.getMicroServicePolicies()) { - pdpGroupMap = updatePdpGroupMap(msPolicy.getPdpGroup(), msPolicy.getPdpSubgroup(), + updatePdpGroupMap(msPolicy.getPdpGroup(), msPolicy.getPdpSubgroup(), msPolicy.getName(), msPolicy.getPolicyModel().getVersion(), pdpGroupMap); } @@ -98,13 +98,12 @@ public class PolicyComponent extends ExternalComponent { return payload; } - private static HashMap<String, HashMap<String, List<JsonObject>>> updatePdpGroupMap(String pdpGroup, - String pdpSubGroup, - String policyName, - String policyModelVersion, - HashMap<String, HashMap<String, - List<JsonObject>>> pdpGroupMap) { - + private static void updatePdpGroupMap(String pdpGroup, + String pdpSubGroup, + String policyName, + String policyModelVersion, + HashMap<String, HashMap<String, + List<JsonObject>>> pdpGroupMap) { JsonObject policyJson = new JsonObject(); policyJson.addProperty("name", policyName); policyJson.addProperty("version", policyModelVersion); @@ -126,8 +125,6 @@ public class PolicyComponent extends ExternalComponent { policyList.add(policyJson); pdpSubGroupMap.put(pdpSubGroup, policyList); pdpGroupMap.put(pdpGroup, pdpSubGroupMap); - - return pdpGroupMap; } private static JsonObject generateActivatePdpGroupPayload( @@ -170,9 +167,7 @@ public class PolicyComponent extends ExternalComponent { List<String> policyNamesList = new ArrayList<>(); for (OperationalPolicy opPolicy : loop.getOperationalPolicies()) { policyNamesList.add(opPolicy.getName()); - for (String guardName : opPolicy.createGuardPolicyPayloads().keySet()) { - policyNamesList.add(guardName); - } + policyNamesList.addAll(opPolicy.createGuardPolicyPayloads().keySet()); } for (MicroServicePolicy microServicePolicy : loop.getMicroServicePolicies()) { policyNamesList.add(microServicePolicy.getName()); diff --git a/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java b/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java index e2b16e62e..65506a479 100644 --- a/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java +++ b/src/main/java/org/onap/clamp/loop/deploy/DcaeDeployParameters.java @@ -24,13 +24,12 @@ package org.onap.clamp.loop.deploy; import com.google.gson.JsonObject; - import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; - import org.onap.clamp.clds.util.JsonUtils; import org.onap.clamp.loop.Loop; +import org.onap.clamp.loop.components.external.DcaeComponent; import org.onap.clamp.policy.microservice.MicroServicePolicy; import org.yaml.snakeyaml.Yaml; @@ -44,8 +43,8 @@ public class DcaeDeployParameters { Set<MicroServicePolicy> microServiceList = loop.getMicroServicePolicies(); for (MicroServicePolicy microService : microServiceList) { - deploymentParamMap.put(microService.getName(), - generateDcaeDeployParameter(microService)); + deploymentParamMap.put(microService.getName(), + generateDcaeDeployParameter(microService)); } return deploymentParamMap; } @@ -55,7 +54,7 @@ public class DcaeDeployParameters { microService.getName()); } - private static JsonObject generateDcaeDeployParameter(String blueprint, String tabName) { + private static JsonObject generateDcaeDeployParameter(String blueprint, String policyId) { JsonObject deployJsonBody = new JsonObject(); Yaml yaml = new Yaml(); Map<String, Object> inputsNodes = ((Map<String, Object>) ((Map<String, Object>) yaml @@ -64,25 +63,29 @@ public class DcaeDeployParameters { Object defaultValue = ((Map<String, Object>) elem.getValue()).get("default"); if (defaultValue != null) { addPropertyToNode(deployJsonBody, elem.getKey(), defaultValue); - } else { + } + else { deployJsonBody.addProperty(elem.getKey(), ""); } }); - // For Dublin only one micro service is expected - deployJsonBody.addProperty("policy_id", tabName); + deployJsonBody.addProperty("policy_id", policyId); return deployJsonBody; } private static void addPropertyToNode(JsonObject node, String key, Object value) { if (value instanceof String) { node.addProperty(key, (String) value); - } else if (value instanceof Number) { + } + else if (value instanceof Number) { node.addProperty(key, (Number) value); - } else if (value instanceof Boolean) { + } + else if (value instanceof Boolean) { node.addProperty(key, (Boolean) value); - } else if (value instanceof Character) { + } + else if (value instanceof Character) { node.addProperty(key, (Character) value); - } else { + } + else { node.addProperty(key, JsonUtils.GSON.toJson(value)); } } @@ -96,9 +99,14 @@ public class DcaeDeployParameters { JsonObject globalProperties = new JsonObject(); JsonObject deployParamJson = new JsonObject(); if (loop.getLoopTemplate().getUniqueBlueprint()) { - String tabName = "loop template blueprint"; - deployParamJson.add(tabName, generateDcaeDeployParameter(loop.getLoopTemplate().getBlueprint(), tabName)); - } else { + // Normally the unique blueprint could contain multiple microservices but then we can't guess + // the policy id params that will be used, so here we expect only one by default. + deployParamJson.add(DcaeComponent.UNIQUE_BLUEPRINT_PARAMETERS, + generateDcaeDeployParameter(loop.getLoopTemplate().getBlueprint(), + ((MicroServicePolicy) loop.getMicroServicePolicies().toArray()[0]).getName())); + + } + else { LinkedHashMap<String, JsonObject> deploymentParamMap = init(loop); for (Map.Entry<String, JsonObject> mapElement : deploymentParamMap.entrySet()) { deployParamJson.add(mapElement.getKey(), mapElement.getValue()); diff --git a/src/main/resources/META-INF/resources/swagger.html b/src/main/resources/META-INF/resources/swagger.html index 3f3ec6eb1..1f8cc9ebe 100644 --- a/src/main/resources/META-INF/resources/swagger.html +++ b/src/main/resources/META-INF/resources/swagger.html @@ -737,13 +737,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b <div class="sect2"> <h3 id="_version_information"><a class="anchor" href="#_version_information"></a><a class="link" href="#_version_information">1.1. Version information</a></h3> <div class="paragraph"> -<p><em>Version</em> : 5.0.0-SNAPSHOT</p> +<p><em>Version</em> : 5.0.2-SNAPSHOT</p> </div> </div> <div class="sect2"> <h3 id="_uri_scheme"><a class="anchor" href="#_uri_scheme"></a><a class="link" href="#_uri_scheme">1.2. URI scheme</a></h3> <div class="paragraph"> -<p><em>Host</em> : localhost:46561<br> +<p><em>Host</em> : localhost:34889<br> <em>BasePath</em> : /restservices/clds/<br> <em>Schemes</em> : HTTP</p> </div> @@ -4344,7 +4344,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b </div> <div id="footer"> <div id="footer-text"> -Last updated 2020-02-12 02:20:53 PST +Last updated 2020-02-12 11:20:53 CET </div> </div> </body> diff --git a/src/main/resources/application-noaaf.properties b/src/main/resources/application-noaaf.properties index 4701b36df..d61b7ed53 100644 --- a/src/main/resources/application-noaaf.properties +++ b/src/main/resources/application-noaaf.properties @@ -81,6 +81,7 @@ server.tomcat.max-idle-time=60000 #Servlet context parameters server.context_parameters.p-name=value #context parameter with p-name as key and value as value. +camel.springboot.tracing=true camel.springboot.consumer-template-cache-size=1000 camel.springboot.producer-template-cache-size=1000 camel.springboot.jmx-enabled=true diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 5bf7910a2..3937d8fc2 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -85,7 +85,7 @@ server.tomcat.max-idle-time=60000 #Servlet context parameters server.context_parameters.p-name=value #context parameter with p-name as key and value as value. - +camel.springboot.tracing=true camel.springboot.consumer-template-cache-size=1000 camel.springboot.producer-template-cache-size=1000 camel.springboot.jmx-enabled=true diff --git a/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/src/main/resources/clds/camel/rest/clamp-api-v2.xml index d81c164a5..e6741d6f8 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -16,10 +16,19 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="GET All Loop names FAILED: ${exception.stacktrace}" /> + + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET All Loop names FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -40,10 +49,19 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="GET Loop request failed for loop: ${header.loopName}, ${exception.stacktrace}" /> + + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET Loop FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -64,10 +82,19 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="GET SVG request failed for loop: ${header.loopName}, ${exception.stacktrace}" /> + + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET SVG For loop FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -96,10 +123,19 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="UPDATE Global properties FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>UPDATE Global properties FAILED </simple> + </setBody> </doCatch> </doTry> </route> @@ -127,10 +163,21 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="UPDATE Operational policies FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + <to + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UPDATE Operational policies request FAILED, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})" /> + + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>UPDATE Operational policies FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -161,10 +208,20 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="UPDATE MicroService policy FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> + <to + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UPDATE MicroService policy request FAILED, Error reported: ${exception.message}','ERROR',${exchangeProperty[loopObject]})" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>UPDATE MicroService policy FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -195,14 +252,20 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> <log loggingLevel="ERROR" - message="DEPLOY request failed for loop: ${header.loopName}" /> + message="DEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>DEPLOY request FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -230,14 +293,20 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> <log loggingLevel="ERROR" - message="REFRESH Micro Service policy request failed for loop: ${header.loopName}" /> + message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH Micro Service policy request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>REFRESH json schema request FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -265,14 +334,20 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> <log loggingLevel="ERROR" - message="REFRESH operational policy request failed for loop: ${header.loopName}" /> + message="REFRESH json schema request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH operational policy request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REFRESH Json schema request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>REFRESH json schema request FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -302,14 +377,20 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> <log loggingLevel="ERROR" - message="UNDEPLOY request failed for loop: ${header.loopName}" /> + message="UNDEPLOY request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('UNDEPLOY request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>UNDEPLOY request FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -339,14 +420,20 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> <log loggingLevel="ERROR" - message="STOP request failed for loop: $${header.loopName}" /> + message="STOP request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>STOP request FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -377,14 +464,20 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> <log loggingLevel="ERROR" - message="RESTART request failed for loop: ${header.loopName}" /> + message="RESTART request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('RESTART request failed, Error reported: ${exception} - Body: ${exception.responseBody}','INFO',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('RESTART request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>RESTART request FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -479,14 +572,20 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> <log loggingLevel="ERROR" - message="SUBMIT request failed for loop: ${header.loopName}" /> + message="SUBMIT request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>SUBMIT request FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -552,14 +651,20 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> <log loggingLevel="ERROR" - message="DELETE request failed for loop: ${header.loopName}" /> + message="DELETE request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>DELETE request FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -584,21 +689,27 @@ <to uri="direct:update-loop-state" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Get Status request successfully executed','INFO',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request successfully executed','INFO',${exchangeProperty[loopObject]})" /> <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" /> </doTry> <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> <log loggingLevel="ERROR" - message="Get Status request failed for loop: ${header.loopName}" /> + message="GET STATUS request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Get Status request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('GET STATUS request failed, Error reported: ${exception} - Body: ${exception.responseBody}','ERROR',${exchangeProperty[loopObject]})" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET STATUS request FAILED</simple> + </setBody> </doCatch> <doFinally> <setBody> @@ -627,14 +738,20 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> <log loggingLevel="ERROR" - message="ADD OperationalPolicy request failed for loop: ${header.loopName}" /> + message="ADD operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> <to uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('ADD OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>ADD Operational policy request FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -657,14 +774,20 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> <log loggingLevel="ERROR" - message="REMOVE OperationalPolicy request failed for loop: ${header.loopName}" /> + message="REMOVE operational policy request FAILED for loop: ${header.loopName}, ${exception.stacktrace}" /> <to uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('REMOVE OperationalPolicy request failed','ERROR',${exchangeProperty[loopObject]})" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>REMOVE Operational policy request FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -691,14 +814,18 @@ <handled> <constant>true</constant> </handled> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="CREATE Loop from Template request failed for loop: ${header.loopName}, ${exception.stacktrace}" /> + <to + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('CREATE Loop from template request failed','ERROR',${exchangeProperty[loopObject]})" /> <setHeader headerName="CamelHttpResponseCode"> <constant>500</constant> </setHeader> - <transform> - <simple>ERROR: ${exception.message}</simple> - </transform> - <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <setBody> + <simple>CREATE Loop from template FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -719,10 +846,18 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="GET Dictionary request failed: ${exception.stacktrace}" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET Dictionary FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -744,10 +879,18 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="GET Dictionary request failed: ${exception.stacktrace}" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET Dictionary FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -769,10 +912,18 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="GET Dictionary request failed for: ${header.dictionaryName}, ${exception.stacktrace}" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET Dictionary FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -796,10 +947,18 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="PUT Dictionary request failed for: ${exception.stacktrace}" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>PUT Dictionary FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -826,10 +985,18 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="PUT Dictionary request failed for: ${header.name}, ${exception.stacktrace}" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>PUT Dictionary FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -850,10 +1017,18 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="DELETE Dictionary request failed for: ${header.name}, ${exception.stacktrace}" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>DELETE Dictionary FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -876,10 +1051,18 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="DELETE Dictionary element request failed for: ${header.name}, ${exception.stacktrace}" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>DELETE Dictionary element FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -904,14 +1087,16 @@ <handled> <constant>true</constant> </handled> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="GET Policy Models request failed for: ${exception.stacktrace}" /> <setHeader headerName="CamelHttpResponseCode"> <constant>500</constant> </setHeader> - <transform> - <simple>ERROR: ${exception.message}</simple> - </transform> - <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <setBody> + <simple>GET Policy models FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -936,14 +1121,16 @@ <handled> <constant>true</constant> </handled> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="GET Policy Model request failed for type: ${header.policyModelType}, ${exception.stacktrace}" /> <setHeader headerName="CamelHttpResponseCode"> <constant>500</constant> </setHeader> - <transform> - <simple>ERROR: ${exception.message}</simple> - </transform> - <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <setBody> + <simple>GET Policy model FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -967,14 +1154,16 @@ <handled> <constant>true</constant> </handled> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="GET Policy Model YAML request failed for type: ${header.policyModelType}, ${exception.stacktrace}" /> <setHeader headerName="CamelHttpResponseCode"> <constant>500</constant> </setHeader> - <transform> - <simple>ERROR: ${exception.message}</simple> - </transform> - <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <setBody> + <simple>GET Policy model YAML FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -1003,14 +1192,16 @@ <handled> <constant>true</constant> </handled> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="POST Policy Model YAML request failed: ${exception.stacktrace}" /> <setHeader headerName="CamelHttpResponseCode"> - <constant>404</constant> + <constant>500</constant> </setHeader> - <transform> - <simple>ERROR: ${exception.message}</simple> - </transform> - <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <setBody> + <simple>POST Policy model YAML FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -1039,14 +1230,16 @@ <handled> <constant>true</constant> </handled> - <setHeader headerName="CamelHttpResponseCode"> - <constant>404</constant> - </setHeader> - <transform> - <simple>ERROR: ${exception.message}</simple> - </transform> <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="MODIFY Policy Model YAML request failed: ${exception.stacktrace}" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>MODIFY Policy model YAML FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -1071,14 +1264,16 @@ <handled> <constant>true</constant> </handled> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="GET ALL templates request failed: ${exception.stacktrace}" /> <setHeader headerName="CamelHttpResponseCode"> <constant>500</constant> </setHeader> - <transform> - <simple>ERROR: ${exception.message}</simple> - </transform> - <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <setBody> + <simple>GET ALL templates FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -1103,14 +1298,16 @@ <handled> <constant>true</constant> </handled> + <to + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="GET Template request failed for template: ${header.templateName}, ${exception.stacktrace}" /> <setHeader headerName="CamelHttpResponseCode"> <constant>500</constant> </setHeader> - <transform> - <simple>ERROR: ${exception.message}</simple> - </transform> - <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <setBody> + <simple>GET Template FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -1131,10 +1328,18 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to - uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="GET All Template names request failed for template: ${exception.stacktrace}" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET All Template names FAILED</simple> + </setBody> </doCatch> </doTry> </route> @@ -1155,10 +1360,18 @@ <doCatch> <exception>java.lang.Exception</exception> <handled> - <constant>false</constant> + <constant>true</constant> </handled> <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" /> + <log loggingLevel="ERROR" + message="GET SVG for template failed for template: ${header.templateName}, ${exception.stacktrace}" /> + <setHeader headerName="CamelHttpResponseCode"> + <constant>500</constant> + </setHeader> + <setBody> + <simple>GET SVG for Template FAILED</simple> + </setBody> </doCatch> </doTry> </route> diff --git a/src/main/resources/logback-default.xml b/src/main/resources/logback-default.xml index 4c496716c..a91f9576b 100644 --- a/src/main/resources/logback-default.xml +++ b/src/main/resources/logback-default.xml @@ -58,16 +58,12 @@ </encoder> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> - <fileNamePattern>${outputDirectory}/clamp/error.%d{yyyy-MM-dd}.%i.log.zip + <fileNamePattern>${logDirectory}/error.%d{yyyy-MM-dd}.%i.log.zip </fileNamePattern> <maxFileSize>50MB</maxFileSize> - <maxHistory>30</maxHistory> - <totalSizeCap>10GB</totalSizeCap> + <maxHistory>20</maxHistory> + <totalSizeCap>1GB</totalSizeCap> </rollingPolicy> - <triggeringPolicy - class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> - <maxFileSize>10MB</maxFileSize> - </triggeringPolicy> </appender> <appender @@ -81,11 +77,11 @@ </encoder> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> - <fileNamePattern>${outputDirectory}/clamp/debug.%d{yyyy-MM-dd}.%i.log.zip + <fileNamePattern>${logDirectory}/debug.%d{yyyy-MM-dd}.%i.log.zip </fileNamePattern> <maxFileSize>50MB</maxFileSize> - <maxHistory>30</maxHistory> - <totalSizeCap>10GB</totalSizeCap> + <maxHistory>20</maxHistory> + <totalSizeCap>1GB</totalSizeCap> </rollingPolicy> </appender> @@ -100,15 +96,13 @@ </pattern> </encoder> <rollingPolicy - class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> - <maxIndex>10</maxIndex> - <FileNamePattern>${logDirectory}/audit.%i.log.zip + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <FileNamePattern>${logDirectory}/audit.%d{yyyy-MM-dd}.%i.log.zip </FileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>20</maxHistory> + <totalSizeCap>1GB</totalSizeCap> </rollingPolicy> - <triggeringPolicy - class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> - <maxFileSize>10MB</maxFileSize> - </triggeringPolicy> </appender> <appender name="asyncEELFAudit" @@ -127,16 +121,15 @@ %msg%n</pattern> </encoder> <rollingPolicy - class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> - <maxIndex>10</maxIndex> - <FileNamePattern>${logDirectory}/metric.%i.log.zip + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <FileNamePattern>${logDirectory}/metric.%d{yyyy-MM-dd}.%i.log.zip </FileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>20</maxHistory> + <totalSizeCap>1GB</totalSizeCap> </rollingPolicy> - <triggeringPolicy - class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> - <maxFileSize>10MB</maxFileSize> - </triggeringPolicy> </appender> + <appender name="asyncEELFMetrics" class="ch.qos.logback.classic.AsyncAppender"> @@ -155,16 +148,15 @@ </pattern> </encoder> <rollingPolicy - class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> - <maxIndex>10</maxIndex> - <FileNamePattern>${logDirectory}/security.%i.log.zip + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <FileNamePattern>${logDirectory}/security.%d{yyyy-MM-dd}.%i.log.zip </FileNamePattern> + <maxFileSize>50MB</maxFileSize> + <maxHistory>20</maxHistory> + <totalSizeCap>1GB</totalSizeCap> </rollingPolicy> - <triggeringPolicy - class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> - <maxFileSize>10MB</maxFileSize> - </triggeringPolicy> </appender> + <appender name="asyncEELFSecurity" class="ch.qos.logback.classic.AsyncAppender"> @@ -177,39 +169,34 @@ class="ch.qos.logback.core.rolling.RollingFileAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> </filter> - <file>${logDirectory}/Audit-${lrmRVer}-${lrmRO}-${Pid}.log</file> + <file>${logDirectory}/Audits.log</file> <rollingPolicy - class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> - <fileNamePattern>${logDirectory}/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/Audits-%d{yyyy-MM-dd}.%i.log.zip </fileNamePattern> - <minIndex>1</minIndex> - <maxIndex>9</maxIndex> + <maxFileSize>50MB</maxFileSize> + <maxHistory>20</maxHistory> + <totalSizeCap>1GB</totalSizeCap> </rollingPolicy> - <triggeringPolicy - class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> - <maxFileSize>5MB</maxFileSize> - </triggeringPolicy> <encoder> <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> </encoder> </appender> + <appender name="perfLogs" class="ch.qos.logback.core.rolling.RollingFileAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> </filter> - <file>${logDirectory}/Perform-${lrmRVer}-${lrmRO}-${Pid}.log</file> + <file>${logDirectory}/Perform.log</file> <rollingPolicy - class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> - <fileNamePattern>${logDirectory}/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/Perform--%d{yyyy-MM-dd}.%i.log.zip </fileNamePattern> - <minIndex>1</minIndex> - <maxIndex>9</maxIndex> + <maxFileSize>50MB</maxFileSize> + <maxHistory>20</maxHistory> + <totalSizeCap>1GB</totalSizeCap> </rollingPolicy> - <triggeringPolicy - class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> - <maxFileSize>5MB</maxFileSize> - </triggeringPolicy> <encoder> <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> </encoder> @@ -221,18 +208,29 @@ <appender-ref ref="DEBUG" /> </logger> <logger + name="org.hibernate" + level="INFO"> + <appender-ref ref="DEBUG" /> + </logger> + <logger + name="org.apache.camel.Tracing" + level="INFO"> + <appender-ref ref="DEBUG" /> + </logger> + + <logger name="org.apache" - level="DEBUG"> + level="INFO"> <appender-ref ref="DEBUG" /> </logger> <!-- Spring related loggers --> <logger name="org.springframework" - level="DEBUG"> + level="INFO"> <appender-ref ref="DEBUG" /> </logger> - <!-- CLDS related loggers --> + <!-- CLAMP related loggers --> <logger name="org.onap.clamp" level="DEBUG"> @@ -240,7 +238,6 @@ <appender-ref ref="DEBUG" /> </logger> - <!-- CLDS related loggers --> <logger name="com.att.eelf.error" level="OFF"> diff --git a/src/main/resources/logback.xml b/src/main/resources/logback-spring.xml index ffa497f1d..ffa497f1d 100644 --- a/src/main/resources/logback.xml +++ b/src/main/resources/logback-spring.xml |