java-decompiler: do not indent log by unprinted messages

master
Roman Shevchenko 10 years ago
parent 6889e7435a
commit 46b494f26f
  1. 18
      src/org/jetbrains/java/decompiler/main/decompiler/PrintStreamLogger.java

@ -39,56 +39,72 @@ public class PrintStreamLogger extends IFernflowerLogger {
@Override
public void writeMessage(String message, Throwable t) {
writeMessage(message, Severity.ERROR);
if (accepts(Severity.ERROR)) {
writeMessage(message, Severity.ERROR);
t.printStackTrace(stream);
}
}
@Override
public void startReadingClass(String className) {
if (accepts(Severity.INFO)) {
writeMessage("Decompiling class " + className, Severity.INFO);
++indent;
}
}
@Override
public void endReadingClass() {
if (accepts(Severity.INFO)) {
--indent;
writeMessage("... done", Severity.INFO);
}
}
@Override
public void startClass(String className) {
if (accepts(Severity.INFO)) {
writeMessage("Processing class " + className, Severity.TRACE);
++indent;
}
}
@Override
public void endClass() {
if (accepts(Severity.INFO)) {
--indent;
writeMessage("... proceeded", Severity.TRACE);
}
}
@Override
public void startMethod(String methodName) {
if (accepts(Severity.INFO)) {
writeMessage("Processing method " + methodName, Severity.TRACE);
++indent;
}
}
public void endMethod() {
if (accepts(Severity.INFO)) {
--indent;
writeMessage("... proceeded", Severity.TRACE);
}
}
@Override
public void startWriteClass(String className) {
if (accepts(Severity.INFO)) {
writeMessage("Writing class " + className, Severity.TRACE);
++indent;
}
}
@Override
public void endWriteClass() {
if (accepts(Severity.INFO)) {
--indent;
writeMessage("... written", Severity.TRACE);
}
}
}

Loading…
Cancel
Save