Class LoggerFactory

java.lang.Object
com.clickhouse.logging.LoggerFactory
Direct Known Subclasses:
JdkLoggerFactory, Slf4jLoggerFactory

public abstract class LoggerFactory extends Object
Unified factory class to get logger.
  • Constructor Details

    • LoggerFactory

      public LoggerFactory()
  • Method Details

    • getLogger

      public static Logger getLogger(Class<?> clazz)
      Gets logger for the given class. Same as getInstance().get(clazz).
      Parameters:
      clazz - class
      Returns:
      logger for the given class
    • getLogger

      public static Logger getLogger(String name)
      Gets logger for the given name. Same as getInstance().get(name).
      Parameters:
      name - name
      Returns:
      logger for the given name
    • getInstance

      public static LoggerFactory getInstance()
      Gets instance of the factory for creating logger.
      Returns:
      factory for creating logger
    • get

      public Logger get(Class<?> clazz)
      Gets logger for the given class.
      Parameters:
      clazz - class
      Returns:
      logger for the given class
    • get

      public abstract Logger get(String name)
      Gets logger for the given name.
      Parameters:
      name - name
      Returns:
      logger for the given name