conditional trace

This commit is contained in:
Maxim.Mossienko
2012-11-29 20:56:00 +01:00
parent 8c7089177b
commit 0522539104
3 changed files with 6 additions and 4 deletions
@@ -30,6 +30,8 @@ import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ex.QuickFixWrapper;
import com.intellij.icons.AllIcons;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.impl.ApplicationImpl;
import com.intellij.openapi.application.impl.ApplicationInfoImpl;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
@@ -340,7 +342,7 @@ class IntentionListStep implements ListPopupStep<IntentionActionWithTextCaching>
@NotNull
public String getTextFor(final IntentionActionWithTextCaching action) {
final String text = action.getAction().getText();
if (text.startsWith("<html>")) {
if (LOG.isDebugEnabled() && text.startsWith("<html>")) {
LOG.info("IntentionAction.getText() returned HTML: action=" + action + " text=" + text);
}
return text;
@@ -84,7 +84,7 @@ public class ReadThread implements Runnable {
public void run() {
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
try {
LOG.info("Starting CvsReadThread " + this);
if (LOG.isDebugEnabled()) LOG.info("Starting CvsReadThread " + this);
while (true) {
try {
waitForRead();
@@ -199,7 +199,7 @@ public class ReadThread implements Runnable {
private void executionCompleted() {
READ_THREADS.remove(this);
LOG.info("Stopping CvsReadThread " + this);
if (LOG.isDebugEnabled()) LOG.info("Stopping CvsReadThread " + this);
}
private int size() {
@@ -391,7 +391,7 @@ public class CvsCommittedChangesProvider implements CachingCommittedChangesProvi
}
final String remoteTag = changeList.getBranch();
if (!Comparing.equal(localTag, remoteTag)) {
LOG.info(filePath + ": local tag " + localTag + ", remote tag " + remoteTag);
if (LOG.isDebugEnabled()) LOG.info(filePath + ": local tag " + localTag + ", remote tag " + remoteTag);
return true;
}
return false;