diff options
author | Gervais-Martial Ngueko <gervais-martial.ngueko@intl.att.com> | 2020-03-31 22:43:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-03-31 22:43:51 +0000 |
commit | 1eafc9448d24f5b0eda40f62566bdf93cc4f5a6e (patch) | |
tree | dfeda6adeef056a4b7cb5a6acc7dcc999f8d2513 /src/main/resources/clds/camel | |
parent | 73be3cb5e615c119a09d95117246a141bbb55af7 (diff) | |
parent | 580141f7cf72d4a120722fc7b870dfc5c3017ced (diff) |
Merge "Rework the logs"
Diffstat (limited to 'src/main/resources/clds/camel')
-rw-r--r-- | src/main/resources/clds/camel/rest/clamp-api-v2.xml | 435 |
1 files changed, 324 insertions, 111 deletions
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> |