Connected via dependency SLF4j-api and Logback. Inside the class I write
private static final Logger log = LoggerFactory.getLogger(Printer.class); then there is a method
public static void collectionPrint(ArrayList list) { Iterator iterator = list.iterator(); while (iterator.hasNext()) { log.info("Printer ",iterator.next()); } } It should display the collection, through System.out.println it displays everything correctly.
And in the logger writes
20: 57: 02.527 [main] INFO com.epam.as.coffeevan.service.BeverageFinder - Printer
How can this be fixed?