Skip to content
Snippets Groups Projects
Commit 16a5498e authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- enhanced logging explicitely

parent 53b4a6f4
Branches
Tags
No related merge requests found
......@@ -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");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment