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

com.jpattern.orm.logger.OrmLogger Maven / Gradle / Ivy

There is a newer version: 3.5.1
Show newest version
package com.jpattern.orm.logger;

import com.jpattern.logger.ILogger;
import com.jpattern.logger.ILoggerFactory;
import com.jpattern.logger.Slf4JLoggerFactory;

/**
 * 
 * @author Francesco Cina
 *
 * 04/giu/2011
 */
public abstract class OrmLogger  {

	/**
	 * 
	 */
	
	private static ILoggerFactory ormLoggerFactory;

	public static void setOrmLoggerFactory(ILoggerFactory ormLoggerFactory) {
		OrmLogger.ormLoggerFactory = ormLoggerFactory;
	}

	public static ILogger getOrmLogger(Class clazz) {
		if ( ormLoggerFactory == null ) {
			ormLoggerFactory = new Slf4JLoggerFactory();
		}
		return ormLoggerFactory.logger(clazz);
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy