From ff25be988f586b93a9c6dc4e0d76e2d8ff1f926e Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Mon, 4 Jan 2016 17:37:24 +0300 Subject: [PATCH] GitHandler: use separate logger to log the command duration (when it didn't take too long). --- plugins/git4idea/src/git4idea/commands/GitHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/git4idea/src/git4idea/commands/GitHandler.java b/plugins/git4idea/src/git4idea/commands/GitHandler.java index 29abf12b9a9c..0aba4bce6958 100644 --- a/plugins/git4idea/src/git4idea/commands/GitHandler.java +++ b/plugins/git4idea/src/git4idea/commands/GitHandler.java @@ -70,6 +70,7 @@ public abstract class GitHandler { protected static final Logger LOG = Logger.getInstance(GitHandler.class); protected static final Logger OUTPUT_LOG = Logger.getInstance("#output." + GitHandler.class.getName()); + private static final Logger TIME_LOG = Logger.getInstance("#time." + GitHandler.class.getName()); protected final Project myProject; protected final GitCommand myCommand; @@ -757,11 +758,11 @@ public abstract class GitHandler { private void logTime() { if (myStartTime > 0) { long time = System.currentTimeMillis() - myStartTime; - if (!LOG.isDebugEnabled() && time > LONG_TIME) { + if (!TIME_LOG.isDebugEnabled() && time > LONG_TIME) { LOG.info(String.format("git %s took %s ms. Command parameters: %n%s", myCommand, time, myCommandLine.getCommandLineString())); } else { - LOG.debug(String.format("git %s took %s ms", myCommand, time)); + TIME_LOG.debug(String.format("git %s took %s ms", myCommand, time)); } } else {