- if (proc.exitValue() != 0) {
- LOG.warn("Exit value was non-zero: " + this);
- } else {
- LOG.debug("Process finished");
- }
- return proc.exitValue();
- } catch (IOException e) {
- IOException exception = new IOException("Error executing process: "
- + this);
- exception.initCause(e);
- throw exception;
- }
- }
-
- private void waitForReader(Thread aReaderThread) {
- try {
- aReaderThread.join();
- } catch (InterruptedException e) {
- LOG
- .warn(this
- + ": error waiting for output stream reader of process to finish");
- }
- }
-
- private Thread readAndLogStream(final String aPrefix,
- final InputStream aStream, final Writer aOutput) {
- Thread inputReader = new Thread() {
- @Override
- public void run() {
- BufferedReader br = null;
- try {
- br = new BufferedReader(new InputStreamReader(aStream));
- String str;
- while ((str = br.readLine()) != null) {
- LOG.debug(aPrefix + str);
+ if (proc.exitValue() != 0) {
+ LOG.warning("Exit value was non-zero: " + this);
+ } else {
+ LOG.fine("Process finished");
+ }
+
+ return proc.exitValue();
+ } catch (IOException e) {
+ IOException exception = new IOException(
+ "Error executing process: " + this);
+ exception.initCause(e);
+ throw exception;
+ }
+ }
+
+ private void waitForReader(Thread aReaderThread) {
+ try {
+ aReaderThread.join();
+ } catch (InterruptedException e) {
+ LOG
+ .log(Level.WARNING, this +
+ ": error waiting for output stream reader of process to finish", e);
+ }
+ }
+
+ private Thread readAndLogStream(final String aPrefix,
+ final InputStream aStream, final Writer aOutput) {
+ Thread inputReader = new Thread() {
+ @Override
+ public void run() {
+ BufferedReader br = null;
+
+ try {
+ br = new BufferedReader(new InputStreamReader(aStream));
+
+ String str;
+
+ while ((str = br.readLine()) != null) {
+ LOG.fine(aPrefix + str);