Package com.pixelmed.slf4j

# Class LoggerFactory

java.lang.Object
com.pixelmed.slf4j.LoggerFactory

public class LoggerFactory extends Object

This class implements a thin wrapper around a subset of methods of the `LoggerFactory` class from the SLF4J facade, in order to allow those methods commonly used by the toolkit to be usable without invoking a runtime dependency on the SLF4J jar files.

The `LoggerFactory` produces a `LoggerFactory` instance if the slf4j-api and an slf4j implementation are present at run time.

Otherwise it mimics the behavior of the slf4j-simple implementation and writes messages to `System.err`.

For how to configure the logger properties, see the package description.

See Also:
  - `Logger`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected static Class<?>`
`slf4jClass`

## Constructor Summary

Constructors
Constructor
Description
`LoggerFactory()`

## Method Summary

Modifier and Type
Method
Description
`static Logger`
`getLogger(Class<?> clazz)`
Return a logger named corresponding to the class passed as parameter.

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### slf4jClass

protected static Class<?> slf4jClass

## Constructor Details

### LoggerFactory

public LoggerFactory()

## Method Details

### getLogger

public static Logger getLogger(Class<?> clazz)

Return a logger named corresponding to the class passed as parameter.

Be warned that if slf4j.detectLoggerNameMismatch system property is set to true at run time (the default is false), a logger name mismatch warning will always be printed when an slf4j implementation is present.

Parameters:
  `clazz` - the returned logger will be named after clazz