diff options
author | marcinrzepeckiwroc <marcin.rzepecki@nokia.com> | 2020-07-14 10:04:43 +0200 |
---|---|---|
committer | Marcin Rzepecki <marcin.rzepecki@nokia.com> | 2020-07-15 12:23:48 +0000 |
commit | a51d1c8c4ca61434d14008e0fbc3575a99ad1c74 (patch) | |
tree | 0065d19eb906f9738ab79e7d0b2fe1150aacffdb /src/main/java | |
parent | 017ecdfea2f7935739b30eb1f12bf4603118191b (diff) |
Change log level for telemetry file from INFO to Debug
Issue-ID: DCAEGEN2-1958
Signed-off-by: marcinrzepeckiwroc <marcin.rzepecki@nokia.com>
Change-Id: I57a20b2efd12074dd15c22917e39a9154a0d9316
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/onap/dcaegen2/services/pmmapper/utils/XMLValidator.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/utils/XMLValidator.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/utils/XMLValidator.java index 9fa3e85..c6fa3fa 100644 --- a/src/main/java/org/onap/dcaegen2/services/pmmapper/utils/XMLValidator.java +++ b/src/main/java/org/onap/dcaegen2/services/pmmapper/utils/XMLValidator.java @@ -24,12 +24,10 @@ import java.nio.file.Files; import java.util.HashMap; import java.util.stream.Stream; import lombok.NonNull; -import org.onap.dcaegen2.services.pmmapper.mapping.Mapper; import org.onap.dcaegen2.services.pmmapper.model.Event; import org.onap.logging.ref.slf4j.ONAPLogAdapter; import org.slf4j.LoggerFactory; import org.xml.sax.SAXException; - import javax.xml.XMLConstants; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.Schema; @@ -40,7 +38,7 @@ import java.io.StringReader; import java.nio.file.Path; public class XMLValidator { - private static final ONAPLogAdapter logger = new ONAPLogAdapter(LoggerFactory.getLogger(Mapper.class)); + private static final ONAPLogAdapter logger = new ONAPLogAdapter(LoggerFactory.getLogger(XMLValidator.class)); private HashMap<String, Schema> schemas; private SchemaFactory schemaFactory; public XMLValidator(Path schemaDirectory) { @@ -68,10 +66,11 @@ public class XMLValidator { try { Validator validator = schemas.get(event.getMetadata().getFileFormatType()).newValidator(); validator.validate(new StreamSource(new StringReader(event.getBody()))); - logger.unwrap().info("XML validation successful {}", event); + logger.unwrap().info("XML validation successful"); + logger.unwrap().debug(String.valueOf(event)); return true; } catch (SAXException | IOException exception) { - logger.unwrap().info("XML validation failed {}", event, exception); + logger.unwrap().error("XML validation failed {}", event, exception); return false; } } |