diff options
author | sebdet <sebastien.determe@intl.att.com> | 2019-08-21 15:27:11 -0700 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2019-08-21 15:27:11 -0700 |
commit | 5e2b077e496ca28e9f91fc12cecb872228c81816 (patch) | |
tree | 8f7eaf47fbe8437ae7bdb368e401485508a1c78c /src/main/resources/clds/camel/routes/utils-flows.xml | |
parent | 38d77f9bbf3239c3616b9b5a4edd9c1f7a77e5b5 (diff) |
Log component
Set the right log component in the camel xml files routes
Issue-ID: CLAMP-428
Change-Id: I476e5b24f5e772c77998508ad3e90c811838386e
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/main/resources/clds/camel/routes/utils-flows.xml')
-rw-r--r-- | src/main/resources/clds/camel/routes/utils-flows.xml | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/main/resources/clds/camel/routes/utils-flows.xml b/src/main/resources/clds/camel/routes/utils-flows.xml index adf843ffe..bbbc46a20 100644 --- a/src/main/resources/clds/camel/routes/utils-flows.xml +++ b/src/main/resources/clds/camel/routes/utils-flows.xml @@ -8,10 +8,21 @@ <route id="dump-loop-log-http-response"> <from uri="direct:dump-loop-log-http-response" /> - <log - loggingLevel="INFO" + <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]})" /> + <choice> + <when> + <simple>${exchangeProperty[logComponent]} == null</simple> + <to + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('${exchangeProperty[logMessage]} - ${header.CamelHttpResponseCode} : ${header.CamelHttpResponseText}','INFO',${exchangeProperty[loopObject]})" /> + </when> + <otherwise> + <to + uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLogForComponent('${exchangeProperty[logMessage]} - ${header.CamelHttpResponseCode} : ${header.CamelHttpResponseText}','INFO','${exchangeProperty[logComponent]}',${exchangeProperty[loopObject]})" /> + <setProperty propertyName="logComponent"> + <constant>null</constant> + </setProperty> + </otherwise> + </choice> </route> </routes>
\ No newline at end of file |