diff --git a/code-transformation/src/main/java/xyz/keksdose/spoon/code_solver/history/ChangeListener.java b/code-transformation/src/main/java/xyz/keksdose/spoon/code_solver/history/ChangeListener.java index 137ce5f85..6bbe72cd7 100644 --- a/code-transformation/src/main/java/xyz/keksdose/spoon/code_solver/history/ChangeListener.java +++ b/code-transformation/src/main/java/xyz/keksdose/spoon/code_solver/history/ChangeListener.java @@ -1,11 +1,13 @@ package xyz.keksdose.spoon.code_solver.history; +import com.google.common.flogger.FluentLogger; import java.util.HashSet; import java.util.Set; import spoon.reflect.declaration.CtType; public class ChangeListener { + private static final FluentLogger logger = FluentLogger.forEnclosingClass(); private boolean changed; private Set> changedTypes = new HashSet<>(); private Changelog changelog = new Changelog(); @@ -19,6 +21,7 @@ public void reset() { } public void setChanged(CtType changedType, Change change) { + logger.atInfo().log("Type %s changed", changedType.getQualifiedName()); changed = true; changedTypes.add(changedType); changelog.addChange(change); diff --git a/code-transformation/src/main/java/xyz/keksdose/spoon/code_solver/printing/ChangedTypePrinting.java b/code-transformation/src/main/java/xyz/keksdose/spoon/code_solver/printing/ChangedTypePrinting.java index 278d8f7e1..956aea780 100644 --- a/code-transformation/src/main/java/xyz/keksdose/spoon/code_solver/printing/ChangedTypePrinting.java +++ b/code-transformation/src/main/java/xyz/keksdose/spoon/code_solver/printing/ChangedTypePrinting.java @@ -20,6 +20,7 @@ public void printChangedTypes(ChangeListener listener, Iterable> newTy continue; } try { + logger.atInfo().log("Writing file %s", type.getQualifiedName()); Files.writeString(type.getPosition().getFile().toPath(), prettyPrinter.printTypes(type)); } catch (Throwable e) { logger.atSevere().withCause(e).log("Could not write file %s", type.getQualifiedName());