List of usage examples for org.apache.ibatis.logging LogFactory getLog
public static Log getLog(String logger)
From source file:com.jklas.search.interceptors.ibatis.Ibatis3Interceptor.java
License:Open Source License
public Object intercept(Invocation invocation) throws Throwable { Object invocationReturn = invocation.proceed(); if (invocation.getArgs().length < 2) return invocationReturn; if (!(invocation.getArgs()[0] instanceof MappedStatement)) return invocationReturn; MappedStatement st = (MappedStatement) invocation.getArgs()[0]; Object entity = invocation.getArgs()[1]; if (!SearchEngine.getInstance().getConfiguration().isMapped(entity)) return invocationReturn; try {//from ww w.ja v a2 s . c o m switch (st.getSqlCommandType()) { case INSERT: searchInterceptor.create(new IndexObjectDto(entity)); break; case UPDATE: searchInterceptor.update(new IndexObjectDto(entity)); break; case DELETE: searchInterceptor.delete(new IndexObjectDto(entity)); break; default: return invocationReturn; } } catch (Exception e) { LogFactory.getLog(getClass()) .error("Error al indexar el entity: " + entity + ". Invocation:" + invocation, e); } return invocationReturn; }
From source file:org.mybatis.logging.LoggerFactory.java
License:Apache License
public static Logger getLogger(Class<?> aClass) { return new Logger(LogFactory.getLog(aClass)); }
From source file:org.mybatis.logging.LoggerFactory.java
License:Apache License
public static Logger getLogger(String logger) { return new Logger(LogFactory.getLog(logger)); }