Module glf.api

Class LoggerFactory

java.lang.Object
org.seppiko.glf.api.LoggerFactory

public final class LoggerFactory extends Object
The LoggerFactory is a utility class producing Loggers for various logging APIs. Other implementations such as NOPLogger and SimpleLogger are also supported.
Author:
Leonard Woo
  • Method Details

    • getLogger

      public static Logger getLogger(String name)
      Return a logger named according to the name parameter using the statically bound ILoggerFactory instance.
      Parameters:
      name - The name of the logger.
      Returns:
      the Logger instance.
    • getLogger

      public static Logger getLogger(Class<?> clazz)
      Return a logger named corresponding to the class passed as parameter, using the statically bound ILoggerFactory instance.
      Parameters:
      clazz - the returned logger will be named after clazz.
      Returns:
      the Logger instance.
    • getLoggerFactory

      public static ILoggerFactory getLoggerFactory()
      Return the ILoggerFactory instance in use.

      ILoggerFactory instance is bound with this class at compile time.

      Returns:
      the ILoggerFactory instance in use.