Logging services can be tested using mock loggers backed by Mockito: there are implementations for commons-logging, JDK logging, SLF4J and tinylog.
slf4j mocking mock-library mocks tinylog junit-extension slf4j-binding slf4j-loggers commons-logging logger-mock slf4j-logger test-logger jdk-logging slf4j-provider tinylog-provider tinylog-writer
-
Updated
Dec 21, 2024 - Java