From 16a5498e500e24f25f7253a1cf489a548384155d Mon Sep 17 00:00:00 2001 From: Andreas Romeyke <art1@andreas-romeyke.de> Date: Tue, 20 Sep 2022 13:33:44 +0200 Subject: [PATCH] - enhanced logging explicitely --- ...BRetroMonographieTIFFFormatValidationPlugin.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/java/org/slub/rosetta/dps/repository/plugin/SLUBRetroMonographieTIFFFormatValidationPlugin.java b/java/org/slub/rosetta/dps/repository/plugin/SLUBRetroMonographieTIFFFormatValidationPlugin.java index 3473949..1caf7dc 100644 --- a/java/org/slub/rosetta/dps/repository/plugin/SLUBRetroMonographieTIFFFormatValidationPlugin.java +++ b/java/org/slub/rosetta/dps/repository/plugin/SLUBRetroMonographieTIFFFormatValidationPlugin.java @@ -128,7 +128,7 @@ public class SLUBRetroMonographieTIFFFormatValidationPlugin implements FormatVal InputStreamReader process_out; try { String execstring = this.checkit_tiff_binary_path.get(version) + " -q " + this.checkit_tiff_config_path.get(version) + " " + filePath ; - log.debug("executing: " + execstring); + log.info("executing: " + execstring); Process p = Runtime.getRuntime().exec(execstring); p.waitFor(); process_out = new InputStreamReader(p.getInputStream()); @@ -143,9 +143,18 @@ public class SLUBRetroMonographieTIFFFormatValidationPlugin implements FormatVal while (line != null) { System.out.println(line); validationLog.add(line + System.lineSeparator()); + log.info( line ); line = reader.readLine(); } reader.close(); + log.info( + "file " + filePath + " is " + + (is_checkit_tiff_valid.get(version) ? "valid" : "invalid") + + " using checkit_tiff version " + version + + " (binary: " + this.checkit_tiff_binary_path.get(version) + + " profile: " + this.checkit_tiff_config_path.get(version) + + " )" + ); } catch (IOException e) { log.error("ERROR: ("+version.name()+") checkit_tiff not available, path=" + this.checkit_tiff_binary_path.get(version) + ", " + e.getMessage()); } catch (InterruptedException e) { @@ -235,7 +244,7 @@ public class SLUBRetroMonographieTIFFFormatValidationPlugin implements FormatVal private void checkFileExists (String filename) throws Exception { File f = new File(filename); if (! f.exists() ) { - System.out.println("ERROR: path=" + filename + " not available"); + log.error("path=" + filename + " not available"); throw new Exception("ERROR: path=" + filename + " not available"); } } -- GitLab