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

- reenabled logging

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