All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.hibernate.search.impl.LoggerFactory Maven / Gradle / Ivy

The newest version!
package org.infinispan.hibernate.search.impl;

import org.infinispan.hibernate.search.logging.Log;
import org.jboss.logging.Logger;

/**
 * Factory for obtaining {@link Logger} instances.
 *
 * @author Sanne Grinovero <[email protected]> (C) 2012 Red Hat Inc.
 * @author Gunnar Morling
 */
public class LoggerFactory {

   private static final CallerProvider callerProvider = new CallerProvider();

   private LoggerFactory() {
   }

   public static Log make() {
      return Logger.getMessageLogger(Log.class, callerProvider.getCallerClass().getCanonicalName());
   }

   private static class CallerProvider extends SecurityManager {

      public Class getCallerClass() {
         return getClassContext()[2];
      }
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy