All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mockito.plugins.MockitoLogger Maven / Gradle / Ivy

There is a newer version: 5.12.0
Show newest version
/*
 * Copyright (c) 2007 Mockito contributors
 * This program is made available under the terms of the MIT License.
 */
package org.mockito.plugins;

/**
 * Mockito 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: *

    *
  1. * The implementation itself, for example org.awesome.mockito.AwesomeLogger that * extends the MockitoLogger. *
  2. *
  3. * 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. *
  4. *
*

* *

Note that if several mockito-extensions/org.mockito.plugins.MockitoLogger files exists in the * classpath Mockito will only use the first returned by the standard {@link ClassLoader#getResource} mechanism. * * @since 2.23.19 */ public interface MockitoLogger { /** * Log specified object. * * @param what to be logged */ void log(Object what); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy