Read the application log when testing your Spring application
From time to time I need to check so that a function correctly logs error messages to the application log. Here is one solution using Logback in a Spring application import ch.qos.logback.classic.Logger; import ch.qos.logback.classic.spi.LoggingEvent; import ch.qos.logback.core.Appender; import org.mockito.ArgumentMatcher; import org.slf4j.LoggerFactory;