From bbd169836fbd5ed7e55c633e846db84652061ff0 Mon Sep 17 00:00:00 2001 From: Fred Date: Fri, 3 Jul 2026 11:12:50 -0300 Subject: [PATCH] chore: improve logging --- .../constructionheuristic/DefaultConstructionHeuristicPhase.java | 1 + .../core/impl/exhaustivesearch/DefaultExhaustiveSearchPhase.java | 1 + .../solver/core/impl/localsearch/DefaultLocalSearchPhase.java | 1 + .../solver/core/impl/phase/custom/DefaultCustomPhase.java | 1 + 4 files changed, 4 insertions(+) diff --git a/core/src/main/java/ai/timefold/solver/core/impl/constructionheuristic/DefaultConstructionHeuristicPhase.java b/core/src/main/java/ai/timefold/solver/core/impl/constructionheuristic/DefaultConstructionHeuristicPhase.java index cae734d261f..6937fa09ec9 100644 --- a/core/src/main/java/ai/timefold/solver/core/impl/constructionheuristic/DefaultConstructionHeuristicPhase.java +++ b/core/src/main/java/ai/timefold/solver/core/impl/constructionheuristic/DefaultConstructionHeuristicPhase.java @@ -158,6 +158,7 @@ public void phaseStarted(ConstructionHeuristicPhaseScope phaseScope) terminationStatus = TerminationStatus.NOT_TERMINATED; moveRepository.phaseStarted(phaseScope); decider.phaseStarted(phaseScope); + logger.debug("Construction Heuristic phase ({}) started.", phaseIndex); } public void stepStarted(ConstructionHeuristicStepScope stepScope) { diff --git a/core/src/main/java/ai/timefold/solver/core/impl/exhaustivesearch/DefaultExhaustiveSearchPhase.java b/core/src/main/java/ai/timefold/solver/core/impl/exhaustivesearch/DefaultExhaustiveSearchPhase.java index 419903bcdbf..f4987b93901 100644 --- a/core/src/main/java/ai/timefold/solver/core/impl/exhaustivesearch/DefaultExhaustiveSearchPhase.java +++ b/core/src/main/java/ai/timefold/solver/core/impl/exhaustivesearch/DefaultExhaustiveSearchPhase.java @@ -94,6 +94,7 @@ public void solvingEnded(SolverScope solverScope) { private void phaseStarted(ExhaustiveSearchPhaseScope phaseScope) { super.phaseStarted(phaseScope); decider.phaseStarted(phaseScope); + logger.debug("Exhaustive Search phase ({}) started.", phaseIndex); } private void phaseEnded(ExhaustiveSearchPhaseScope phaseScope) { diff --git a/core/src/main/java/ai/timefold/solver/core/impl/localsearch/DefaultLocalSearchPhase.java b/core/src/main/java/ai/timefold/solver/core/impl/localsearch/DefaultLocalSearchPhase.java index c3bfe0dbd95..d8853b4a5b2 100644 --- a/core/src/main/java/ai/timefold/solver/core/impl/localsearch/DefaultLocalSearchPhase.java +++ b/core/src/main/java/ai/timefold/solver/core/impl/localsearch/DefaultLocalSearchPhase.java @@ -135,6 +135,7 @@ public void phaseStarted(LocalSearchPhaseScope phaseScope) { super.phaseStarted(phaseScope); decider.phaseStarted(phaseScope); assertWorkingSolutionInitialized(phaseScope); + logger.debug("Local Search phase ({}) started.", phaseIndex); } @Override diff --git a/core/src/main/java/ai/timefold/solver/core/impl/phase/custom/DefaultCustomPhase.java b/core/src/main/java/ai/timefold/solver/core/impl/phase/custom/DefaultCustomPhase.java index 3496d7ac328..ec2ed33a5ca 100644 --- a/core/src/main/java/ai/timefold/solver/core/impl/phase/custom/DefaultCustomPhase.java +++ b/core/src/main/java/ai/timefold/solver/core/impl/phase/custom/DefaultCustomPhase.java @@ -81,6 +81,7 @@ public void solve(SolverScope solverScope) { public void phaseStarted(AbstractPhaseScope phaseScope) { super.phaseStarted(phaseScope); terminationStatus = TerminationStatus.NOT_TERMINATED; + logger.debug("Custom phase ({}) started.", phaseIndex); } private void doStep(CustomStepScope stepScope, PhaseCommand customPhaseCommand) {