diff --git a/java/org/slub/rosetta/dps/repository/plugin/SLUBMatroskaFFV1FormatValidationPlugin.java b/java/org/slub/rosetta/dps/repository/plugin/SLUBMatroskaFFV1FormatValidationPlugin.java index 06e835cd4f60878f253469e393f133c1ac0a7472..ad9cdb9f98741c57e3e0c40c671c9730793c37d4 100644 --- a/java/org/slub/rosetta/dps/repository/plugin/SLUBMatroskaFFV1FormatValidationPlugin.java +++ b/java/org/slub/rosetta/dps/repository/plugin/SLUBMatroskaFFV1FormatValidationPlugin.java @@ -79,7 +79,11 @@ public class SLUBMatroskaFFV1FormatValidationPlugin implements FormatValidationP } catch (Exception e) { e.printStackTrace(); } - // TODO: log.info(); + log.info( "SLUBMatroskaFFV1FormatValidationPlgin instantiated with" + + " meduaconch binary=" + mediaconch_binary_path + + "cfg (current)=" + mediaconch_current_profile_path + + "cfg (upcoming)=" + mediaconch_upcoming_profile_path + ); } @Override @@ -102,7 +106,7 @@ public class SLUBMatroskaFFV1FormatValidationPlugin implements FormatValidationP private void callMediaconch(String filePath, String profilePath) { String execstring = this.mediaconch_binary_path + " " + filePath + " -p " + profilePath; - System.out.println("executing: " + execstring); + log.info("executing: " + execstring); InputStreamReader process_out; try { Process p = Runtime.getRuntime().exec(execstring); @@ -124,13 +128,14 @@ public class SLUBMatroskaFFV1FormatValidationPlugin implements FormatValidationP System.out.println("MEDIACONCH line: " + line); validationLog.add(line); line = reader.readLine(); + log.info( line ); } reader.close(); } catch (IOException e) { - //log.error("exception creation socket, clamd not available at host=" + host + "port=" + port, e); + log.error("exception creation socket, clamd not available at host=" + host + "port=" + port, e); System.out.println("ERROR: (actual) mediaconch not available, path=" + this.mediaconch_binary_path + ", " + e.getMessage()); } catch (InterruptedException e) { - System.out.println("ERROR: call of mediaconch interrupted, path=" + this.mediaconch_binary_path + ", " + e.getMessage()); + log.error("ERROR: call of mediaconch interrupted, path=" + this.mediaconch_binary_path + ", " + e.getMessage()); } } @@ -199,14 +204,14 @@ public class SLUBMatroskaFFV1FormatValidationPlugin implements FormatValidationP @Override public final boolean isValid() { - //System.out.println("DEBUG: is valid=" + this.isvalid); + log.debug("is valid=" + this.isvalid); return this.isvalid; } 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"); } }