diff --git a/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXDeserializer.java b/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXDeserializer.java index 069e64cd..111f140c 100644 --- a/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXDeserializer.java +++ b/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXDeserializer.java @@ -130,7 +130,7 @@ public List getRelatedFiles() throws InvalidFormatException, IOExc try { files.add(readFile(aasxRoot, filePath)); } catch (Exception e) { - logger.warn("Loading file " + filePath + " failed and will not be included. Exception: " + e); + logger.warn("Loading file {} failed and will not be included.", filePath, e); } } return files; @@ -168,7 +168,7 @@ private PackageRelationshipCollection getXMLDocumentRelation(PackagePart originP private String getXMLPart(PackagePart originPart) throws InvalidFormatException { if (isCompatibilityModeNeeded(originPart)) { - logger.warn("AASX contains wrong Relationship namespace. This may be related to the AASX being created with an old version of AASX Package Explorer or an old version of AAS4J. Future compatibility with the wrong namespace may not be guaranteed"); + logger.info("AASX contains wrong Relationship namespace. This may be related to the AASX being created with an old version of AASX Package Explorer or an old version of AAS4J. Future compatibility with the wrong namespace may not be guaranteed"); return AASPEC_RELTYPE_BACKWARDSCOMPATIBLE; } else { return AASXSerializer.AASSPEC_RELTYPE; diff --git a/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXSerializer.java b/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXSerializer.java index a287b121..b8d13bef 100644 --- a/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXSerializer.java +++ b/dataformat-aasx/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/aasx/AASXSerializer.java @@ -147,11 +147,11 @@ private void createParts(Collection files, String filePath, OPCPac PackagePart xmlPart, String contentType) { try { InMemoryFile content = findFileByPath(files, filePath); - logger.trace("Writing file '" + filePath + "' to .aasx."); + logger.trace("Writing file '{}' to .aasx.", filePath); createAASXPart(rootPackage, xmlPart, filePath, contentType, AASSUPPL_RELTYPE, content.getFileContent()); } catch (RuntimeException e) { // Log that a file is missing and continue building the .aasx - logger.warn("Could not add File '" + filePath + "'. It was not contained in given InMemoryFiles."); + logger.warn("Could not add File '{}'. It was not contained in given InMemoryFiles.", filePath, e); } } diff --git a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/ReflectionHelper.java b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/ReflectionHelper.java index b6902564..41b64858 100644 --- a/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/ReflectionHelper.java +++ b/dataformat-core/src/main/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/util/ReflectionHelper.java @@ -216,7 +216,7 @@ public static Class getAasInterface(Class type) { if (implementedAasInterfaces.size() == 1) { return implementedAasInterfaces.iterator().next(); } - logger.warn("class '{}' implements more than one AAS interface, but only most specific one is returned", type.getName()); + logger.debug("class '{}' implements more than one AAS interface, but only most specific one is returned", type.getName()); return implementedAasInterfaces.stream().map(x -> TypeToken.of(x)) .sorted(new MostSpecificTypeTokenComparator()) .findFirst().get() diff --git a/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSerializerTest.java b/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSerializerTest.java index 469a163d..47c40960 100644 --- a/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSerializerTest.java +++ b/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlSerializerTest.java @@ -290,7 +290,7 @@ private boolean ignoreDefaults(Node node) { private void logErrors(String validatedFileName, Set errors) { if (errors.isEmpty()) return; - logger.info("Validate file: " + validatedFileName); + logger.info("Validate file: {}", validatedFileName); for (String error : errors) { logger.info(error); } diff --git a/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlValidationTest.java b/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlValidationTest.java index 67940aa6..9745b7eb 100644 --- a/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlValidationTest.java +++ b/dataformat-xml/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/xml/XmlValidationTest.java @@ -66,7 +66,7 @@ private void logErrors(String validatedFileName, Set errors) { if (errors.isEmpty()) { return; } - logger.info("Validate file: " + validatedFileName); + logger.info("Validate file: {}", validatedFileName); for (String error : errors) { logger.info(error); }