aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/main/java/org/onap/so/utils/XmlMarshaller.java
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/main/java/org/onap/so/utils/XmlMarshaller.java')
-rw-r--r--common/src/main/java/org/onap/so/utils/XmlMarshaller.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/src/main/java/org/onap/so/utils/XmlMarshaller.java b/common/src/main/java/org/onap/so/utils/XmlMarshaller.java
index 0022ecbb96..0ff3ccfa9c 100644
--- a/common/src/main/java/org/onap/so/utils/XmlMarshaller.java
+++ b/common/src/main/java/org/onap/so/utils/XmlMarshaller.java
@@ -32,6 +32,7 @@ import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.sax.SAXSource;
+import org.onap.so.logger.LoggingAnchor;
import org.onap.so.exceptions.MarshallerException;
import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
@@ -52,8 +53,8 @@ public class XmlMarshaller {
Marshaller jaxbMarshaller = jaxbContext.createMarshaller();
jaxbMarshaller.marshal(object, stringWriter);
} catch (JAXBException e) {
- logger.error("{} {} {}", MessageEnum.GENERAL_EXCEPTION.toString(), ErrorCode.SchemaError.getValue(),
- e.getMessage(), e);
+ logger.error(LoggingAnchor.THREE, MessageEnum.GENERAL_EXCEPTION.toString(),
+ ErrorCode.SchemaError.getValue(), e.getMessage(), e);
throw new MarshallerException(e.getMessage(), ErrorCode.SchemaError.getValue(), e);
}
@@ -77,8 +78,8 @@ public class XmlMarshaller {
SAXSource source = new SAXSource(xmlReader, inputSource);
object = jaxbUnmarshaller.unmarshal(source, object.getClass()).getValue();
} catch (Exception e) {
- logger.error("{} {} {}", MessageEnum.GENERAL_EXCEPTION.toString(), ErrorCode.SchemaError.getValue(),
- e.getMessage(), e);
+ logger.error(LoggingAnchor.THREE, MessageEnum.GENERAL_EXCEPTION.toString(),
+ ErrorCode.SchemaError.getValue(), e.getMessage(), e);
throw new MarshallerException(e.getMessage(), ErrorCode.SchemaError.getValue(), e);
}