MatchLogger

com.phasmidsoftware.matchers.MatchLogger
See theMatchLogger companion class
object MatchLogger

Companion object for the MatchLogger class, providing utility methods to create instances of MatchLogger using standard configurations.

This object facilitates the creation of MatchLogger instances with specified log levels, target classes, or custom logger implementations.

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(logLevel: LogLevel, clazz: Class[_]): MatchLogger

Creates a new instance of MatchLogger with the specified logging level and the logger associated with the given class.

Creates a new instance of MatchLogger with the specified logging level and the logger associated with the given class.

This method utilizes the SLF4J LoggerFactory to generate the underlying logger instance for the provided class and combines it with the specified log level to create a MatchLogger.

Value parameters

clazz

The class for which the logger will be created, linking log messages to it.

logLevel

The desired logging level for the MatchLogger (e.g., LogOff, LogInfo, LogDebug).

Attributes

Returns

A MatchLogger instance configured with the given log level and class-based logger.

def apply(logger: Logger): MatchLogger

Creates a MatchLogger instance with the LogInfo log level using the provided SLF4J Logger.

Creates a MatchLogger instance with the LogInfo log level using the provided SLF4J Logger.

Value parameters

logger

The SLF4J Logger to be used for logging.

Attributes

Returns

A MatchLogger instance configured to log at the LogInfo level and utilize the given SLF4J Logger for logging operations.

Implicits

Implicits

implicit val matchLogger: MatchLogger

An implicit MatchLogger instance configured with LogOff log level and associated with the Matchers class.

An implicit MatchLogger instance configured with LogOff log level and associated with the Matchers class.

This logger is used implicitly wherever a MatchLogger is required, enabling logging behavior to be defined according to the specified LogOff level. With LogOff, logging is effectively disabled.

The logger is instantiated using the apply method of the MatchLogger companion object.

Attributes