Package org.mockito.plugins
Interface MockitoLogger
-
public interface MockitoLoggerMockito logger.By default logs to console
All mockito logging goes through this class and could be customized as usual Mockito plugin.
Using the extension point
Suppose you wrote an extension to customize logging, in order to tell Mockito to use it you need to put in your classpath:
-
The implementation itself, for example
org.awesome.mockito.AwesomeLoggerthat extends theMockitoLogger. -
A file "
mockito-extensions/org.mockito.plugins.MockitoLogger". The content of this file is exactly a one line with the qualified name:org.awesome.mockito.AwesomeLogger.
Note that if several
mockito-extensions/org.mockito.plugins.MockitoLoggerfiles exists in the classpath Mockito will only use the first returned by the standardClassLoader.getResource(java.lang.String)mechanism.- Since:
- 2.23.19
-
The implementation itself, for example
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidlog(Object what)Log specified object.
-
-
-
Method Detail
-
log
void log(Object what)
Log specified object.- Parameters:
what- to be logged
-
-