Class MorphiaLoggerFactory


  • public final class MorphiaLoggerFactory
    extends java.lang.Object
    Morphia's logging factory that can return either an slf4j LoggerFactory or a JDK LoggerFactory.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Logger get​(java.lang.Class<?> c)
      Gets or creates a Logger for the given class.
      static void registerLogger​(java.lang.Class<? extends LoggerFactory> factoryClass)
      Register a LoggerFactory; last one registered is used.
      static void reset()
      Clears the logger factory
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • get

        public static Logger get​(java.lang.Class<?> c)
        Gets or creates a Logger for the given class.
        Parameters:
        c - the class to use for naming
        Returns:
        the Logger
      • registerLogger

        public static void registerLogger​(java.lang.Class<? extends LoggerFactory> factoryClass)
        Register a LoggerFactory; last one registered is used.
        Parameters:
        factoryClass - the factory class
      • reset

        public static void reset()
        Clears the logger factory