Class LoggerFactory

java.lang.Object
net.spy.memcached.compat.log.LoggerFactory

public final class LoggerFactory extends Object
Factory to get logger instances. The system property net.spy.log.LoggerImpl should point to an implementation of net.spy.compat.log.Logger to use.

Depending on how and where this was compiled, a sun logger (jdk 1.4) and/or log4j logger implementation may be included. Both are included with the official distribution.

See Also:
  • Method Details

    • getLogger

      public static Logger getLogger(Class<?> clazz)
      Get a logger by class.
      Parameters:
      clazz - the class for which we want the logger.
      Returns:
      a Logger instance
    • getLogger

      public static Logger getLogger(String name)
      Get a logger by name.
      Parameters:
      name - the name for which we want the logger
      Returns:
      a Logger instance