Use slf4j
This commit is contained in:
parent
464bf4cda6
commit
783d9dbd01
@ -8,9 +8,13 @@ import java.util.Set;
|
||||
import ai.timefold.solver.core.api.solver.Solver;
|
||||
import ai.timefold.solver.core.api.solver.SolverFactory;
|
||||
import ai.timefold.solver.core.config.solver.SolverConfig;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ShiftScheduleApp {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ShiftScheduleApp.class);
|
||||
|
||||
public static void main(String[] args) {
|
||||
SolverFactory<ShiftSchedule> solverFactory = SolverFactory.create(new SolverConfig()
|
||||
.withSolutionClass(ShiftSchedule.class)
|
||||
@ -43,9 +47,9 @@ public class ShiftScheduleApp {
|
||||
}
|
||||
|
||||
private static void printSolution(ShiftSchedule solution) {
|
||||
System.out.println("Shift assignments");
|
||||
logger.info("Shift assignments");
|
||||
for (Shift shift : solution.getShifts()) {
|
||||
System.out.println(" " + shift.getStart().toLocalDate()
|
||||
logger.info(" " + shift.getStart().toLocalDate()
|
||||
+ " " + shift.getStart().toLocalTime() + " - " + shift.getEnd().toLocalTime()
|
||||
+ ": " + shift.getEmployee().getName());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user