diff options
author | Christophe Closset <christophe.closset@intl.att.com> | 2019-05-03 12:49:33 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-05-03 12:49:33 +0000 |
commit | eb955595cb54ef28cd0156f6a364d6e232975286 (patch) | |
tree | c9caba55f27ac97061a2e91734f71b1ffc638deb | |
parent | 7e8938e2bf7eae76bd527a28fd453650cf744e1a (diff) | |
parent | 584cc4a3f093edc5cdbdff0dcb5dcbe8457e197d (diff) |
Merge "Fix log reporting"
4 files changed, 9 insertions, 9 deletions
diff --git a/extra/sql/bulkload/create-tables.sql b/extra/sql/bulkload/create-tables.sql index 3c261eb4..da39ca5f 100644 --- a/extra/sql/bulkload/create-tables.sql +++ b/extra/sql/bulkload/create-tables.sql @@ -9,7 +9,7 @@ id bigint not null, log_instant datetime(6) not null, log_type varchar(255) not null, - message varchar(255) not null, + message MEDIUMTEXT not null, loop_id varchar(255) not null, primary key (id) ) engine=InnoDB; diff --git a/src/main/java/org/onap/clamp/loop/log/LoopLog.java b/src/main/java/org/onap/clamp/loop/log/LoopLog.java index 3edb2ee5..cea49571 100644 --- a/src/main/java/org/onap/clamp/loop/log/LoopLog.java +++ b/src/main/java/org/onap/clamp/loop/log/LoopLog.java @@ -69,7 +69,7 @@ public class LoopLog implements Serializable { private LogType logType; @Expose - @Column(name = "message", nullable = false) + @Column(name = "message", columnDefinition = "MEDIUMTEXT", nullable = false) private String message; @ManyToOne(fetch = FetchType.LAZY) 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 45cad032..4d3c6b38 100644 --- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml +++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml @@ -336,7 +336,7 @@ loggingLevel="ERROR" message="STOP request failed for loop: $${header.loopName}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request failed','ERROR',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" /> </doCatch> </doTry> </route> @@ -381,7 +381,7 @@ loggingLevel="ERROR" message="START request failed for loop: ${header.loopName}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('START request failed','INFO',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('START request failed, Error reported: ${exception}','INFO',${exchangeProperty[loopObject]})" /> </doCatch> </doTry> </route> @@ -489,7 +489,7 @@ loggingLevel="ERROR" message="SUBMIT request failed for loop: ${header.loopName}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed','ERROR',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" /> </doCatch> </doTry> </route> @@ -571,7 +571,7 @@ loggingLevel="ERROR" message="DELETE request failed for loop: ${header.loopName}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed','ERROR',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request failed, Error reported: ${exception}','ERROR',${exchangeProperty[loopObject]})" /> </doCatch> </doTry> </route> diff --git a/src/main/resources/clds/camel/routes/flexible-flow.xml b/src/main/resources/clds/camel/routes/flexible-flow.xml index a116c568..8cf1cdfd 100644 --- a/src/main/resources/clds/camel/routes/flexible-flow.xml +++ b/src/main/resources/clds/camel/routes/flexible-flow.xml @@ -478,8 +478,7 @@ <constant>false</constant> </handled> <setProperty propertyName="logMessage"> - <simple>${exchangeProperty[policyName]} PDP Group removal status - </simple> + <simple>PDP Group removal, Error reported: ${exception}</simple> </setProperty> <to uri="direct:dump-loop-log-http-response" /> </doCatch> @@ -715,7 +714,8 @@ <route id="dump-loop-log-http-response"> <from uri="direct:dump-loop-log-http-response" /> + <log loggingLevel="INFO" message="${exchangeProperty[logMessage]} - ${header.CamelHttpResponseCode} : ${header.CamelHttpResponseText}" /> <to - uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog(${exchangeProperty[logMessage]} - ${header.CamelHttpResponseCode} : ${header.CamelHttpResponseText},'INFO',${exchangeProperty[loopObject]})" /> + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('${exchangeProperty[logMessage]} - ${header.CamelHttpResponseCode} : ${header.CamelHttpResponseText}','INFO',${exchangeProperty[loopObject]})" /> </route> </routes>
\ No newline at end of file |