From b4f0f9336ae9114efceff55a4c367be3e74d9564 Mon Sep 17 00:00:00 2001 From: Hugo Hills <39260692+hugohills-regnosys@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:05:16 +0100 Subject: [PATCH 1/2] Improve logging (#431) --- .../rosetta/common/translation/MappingProcessorStep.java | 5 +++++ .../regnosys/rosetta/common/validation/ValidationReport.java | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/regnosys/rosetta/common/translation/MappingProcessorStep.java b/src/main/java/com/regnosys/rosetta/common/translation/MappingProcessorStep.java index 8992dfbf..9f66e6f9 100644 --- a/src/main/java/com/regnosys/rosetta/common/translation/MappingProcessorStep.java +++ b/src/main/java/com/regnosys/rosetta/common/translation/MappingProcessorStep.java @@ -83,8 +83,13 @@ public PostProcessorReport runProcessStep(Class 200) { + LOGGER.debug("Took {} ms to run mapper {} for model path {}", t, mapper.getClass().getSimpleName(), mapper.getModelPath()); + } builder.process(path, processor); } // Mapper thread waits for invoked tasks to complete before continuing (subject to timeout before) diff --git a/src/main/java/com/regnosys/rosetta/common/validation/ValidationReport.java b/src/main/java/com/regnosys/rosetta/common/validation/ValidationReport.java index f2dc29d5..a5408055 100644 --- a/src/main/java/com/regnosys/rosetta/common/validation/ValidationReport.java +++ b/src/main/java/com/regnosys/rosetta/common/validation/ValidationReport.java @@ -67,9 +67,9 @@ public List> results() { public void logReport() { for (ValidationResult validationResult : validationResults) { if (!validationResult.isSuccess()) { - LOGGER.error(validationResult.toString()); - } else { LOGGER.debug(validationResult.toString()); + } else { + LOGGER.trace(validationResult.toString()); } } } From ed9379f8abef5f3c7304a77e55ef886e0ad4f982 Mon Sep 17 00:00:00 2001 From: Hugo Hills <39260692+hugohills-regnosys@users.noreply.github.com> Date: Mon, 16 Sep 2024 17:26:06 +0100 Subject: [PATCH 2/2] Improve logging (#432) --- .../com/regnosys/rosetta/common/util/ClassPathUtils.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/regnosys/rosetta/common/util/ClassPathUtils.java b/src/main/java/com/regnosys/rosetta/common/util/ClassPathUtils.java index 69dd3ded..52dd2bbd 100644 --- a/src/main/java/com/regnosys/rosetta/common/util/ClassPathUtils.java +++ b/src/main/java/com/regnosys/rosetta/common/util/ClassPathUtils.java @@ -49,13 +49,12 @@ public class ClassPathUtils { * @param classLoader Classloader to search in. * @return */ - public static List findPathsFromClassPath(Collection classPathDirectories, String includeRegex, Optional excludeRegex, ClassLoader classLoader) { List modelPaths = classPathDirectories.stream().flatMap(path -> loadFromClasspath(path, classLoader)) .collect(Collectors.toList()); List expandedModelPaths = expandPaths(modelPaths, includeRegex, excludeRegex); - LOGGER.debug("Using paths:" + expandedModelPaths); - expandedModelPaths.forEach(x -> LOGGER.debug(" " + x)); + LOGGER.trace("Using paths: {}", expandedModelPaths); + expandedModelPaths.forEach(x -> LOGGER.trace(" {}", x)); return expandedModelPaths; }