This is an automated email from the ASF dual-hosted git repository.
quinn pushed a commit to branch camel-2.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.22.x by this push:
new fc06905 CAMEL-12659: Don't log error message when HL7 Headers
population is disabled
fc06905 is described below
commit fc069058dbf283e5b72e58d6c3e3f438c8c34ec0
Author: Quinn Stevenson <[email protected]>
AuthorDate: Tue Jul 17 11:18:12 2018 -0600
CAMEL-12659: Don't log error message when HL7 Headers population is disabled
---
.../apache/camel/component/mllp/MllpTcpServerConsumer.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git
a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java
index dcd32d8..030fa47 100644
---
a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java
+++
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java
@@ -290,7 +290,7 @@ public class MllpTcpServerConsumer extends DefaultConsumer {
void populateHl7DataHeaders(Exchange exchange, Message message, byte[]
hl7MessageBytes) {
- if (exchange != null && exchange.getException() == null) {
+ if (getConfiguration().isHl7Headers() && exchange != null &&
exchange.getException() == null) {
if (hl7MessageBytes == null || hl7MessageBytes.length < 8) {
// Not enough data to populate anything - just return
return;
@@ -315,8 +315,8 @@ public class MllpTcpServerConsumer extends DefaultConsumer {
if (-1 == endOfMSH) {
// TODO: May want to throw some sort of an Exception here
- log.error("Population of message headers failed - unable to
find the end of the MSH segment");
- } else if (getConfiguration().isHl7Headers()) {
+ log.warn("Population of message headers failed - unable to
find the end of the MSH segment");
+ } else {
log.debug("Populating the HL7 message headers");
Charset charset = getConfiguration().getCharset(exchange);
@@ -384,10 +384,11 @@ public class MllpTcpServerConsumer extends
DefaultConsumer {
}
}
}
- } else {
- log.trace("HL7 Message headers disabled");
}
+ } else {
+ log.trace("HL7 Message headers disabled");
}
+
}