diff options
author | Andrey Loskutov <loskutov@gmx.de> | 2015-10-31 00:06:27 +0100 |
---|---|---|
committer | Andrey Loskutov <loskutov@gmx.de> | 2015-10-31 00:06:27 +0100 |
commit | 3601c8cdf116f7bac2f624b46a22cba2e4f14d92 (patch) | |
tree | e5d5ff6b0fbf56aa73c718efb5ac84df8727e3be /org.eclipse.jgit | |
parent | 1eee0466ca9ac8dd04d7896f8e4aae3d7d31926f (diff) | |
download | jgit-3601c8cdf116f7bac2f624b46a22cba2e4f14d92.tar.gz jgit-3601c8cdf116f7bac2f624b46a22cba2e4f14d92.zip |
Don't report errors logged by FS with "debug" level
Change-Id: I6a10116cd2e6b58d2300a9e741afe2eeac719b03
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java index f5cdab0f4d..45bd3ad40a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java @@ -60,6 +60,7 @@ import java.text.MessageFormat; import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import java.util.Objects; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -477,7 +478,7 @@ public abstract class FS { } } } catch (IOException e) { - LOG.debug("Caught exception in FS.readPipe()", e); //$NON-NLS-1$ + LOG.error("Caught exception in FS.readPipe()", e); //$NON-NLS-1$ } if (debug) { LOG.debug("readpipe returns null"); //$NON-NLS-1$ @@ -489,32 +490,20 @@ public abstract class FS { private final Process p; private final String desc; private final String dir; - private final boolean debug = LOG.isDebugEnabled(); final AtomicBoolean fail = new AtomicBoolean(); GobblerThread(Process p, String[] command, File dir) { this.p = p; - if (debug) { - this.desc = Arrays.asList(command).toString(); - this.dir = dir.toString(); - } else { - this.desc = null; - this.dir = null; - } + this.desc = Arrays.toString(command); + this.dir = Objects.toString(dir); } public void run() { InputStream is = p.getErrorStream(); try { int ch; - if (debug) { - while ((ch = is.read()) != -1) { - System.err.print((char) ch); - } - } else { - while (is.read() != -1) { - // ignore - } + while ((ch = is.read()) != -1) { + System.err.print((char) ch); } } catch (IOException e) { logError(e); @@ -529,12 +518,9 @@ public abstract class FS { } private void logError(Throwable t) { - if (!debug) { - return; - } String msg = MessageFormat.format( JGitText.get().exceptionCaughtDuringExcecutionOfCommand, desc, dir); - LOG.debug(msg, t); + LOG.error(msg, t); } } |