List of usage examples for org.apache.commons.logging LogFactory getLog
public static Log getLog(String name)
From source file:com.jpeterson.littles3.bo.ResourceTest.java
/** * Create the test case/*from w w w. j av a2s. co m*/ * * @param testName * name of the test case */ public ResourceTest(String testName) { super(testName); logger = LogFactory.getLog(this.getClass()); logger.debug("ResourceTest"); }
From source file:com.curl.orb.generator.ClassPropertyLoader.java
/** * Get one class property in ApplicationContext. * /*from w w w . j a va 2 s . com*/ * @param name the component name * @return the class property * @throws ApplicationContextException * @throws GeneratorException */ public static ClassProperty getClassPropertyInApplicationContext(String name) throws ApplicationContextException, GeneratorException { // debug (LogFactory.getLog(ClassPropertyLoader.class)).info("Generate Curl code [" + name + "]"); ClassProperty classProperty = new ClassProperty( ApplicationContextFactory.getInstance(null).getApplicationContext().getObjectType(name).getName(), name); if (!classProperty.isPublic()) throw new GeneratorException("Cannot access to this class:" + name); return classProperty; }
From source file:net.sf.jsptest.compiler.jsp20.mock.MockJspWriter.java
public MockJspWriter() { super(1024, true); log = LogFactory.getLog(getClass()); stringWriter = new StringWriter(); writer = new PrintWriter(stringWriter, true); }
From source file:com.adaptris.http.test.BaseRequestProcessor.java
BaseRequestProcessor() {
logR = LogFactory.getLog(this.getClass());
}
From source file:com.rsmart.rfabric.logging.FormattedLogger.java
/** * Uses {@link StackTraceElement[]} from {@link Throwable} to determine the calling class. Then, the {@link Log} is retrieved for it by * convention/*ww w . j av a 2 s. c om*/ * * * @return Log for the calling class */ private static final Log getLog() { try { return LogFactory.getLog(Class.forName(new Throwable().getStackTrace()[3].getClassName())); } catch (Exception e) { return LogFactory.getLog(FormattedLogger.class); } }
From source file:com.winvector.logistic.demo.MapReduceScore.java
@Override public int run(final String[] args) throws Exception { if (args.length != 3) { final Log log = LogFactory.getLog(MapReduceScore.class); log.info(Licenses.licenses);// w ww. j a v a 2 s . co m log.fatal("use: MapReduceScore model.ser testFile resultDir"); return -1; } final String modelFileName = args[0]; final String testFileName = args[1]; final String resultFileName = args[2]; run(modelFileName, testFileName, resultFileName); return 0; }
From source file:br.com.uol.pagseguro.api.utils.logging.CommonsLoggerFactory.java
/** * Constructs the logger by name/*from www . j a va 2s. c om*/ * * @param name Name * @return Instance of commons log */ @Override protected Log doGetLog(String name) { return new CommonsLog(LogFactory.getLog(name)); }
From source file:com.jpeterson.littles3.bo.ResourcePermissionTest.java
/** * Create the test case/*w ww . j a va 2 s . c om*/ * * @param testName * name of the test case */ public ResourcePermissionTest(String testName) { super(testName); logger = LogFactory.getLog(this.getClass()); logger.debug("ResourcePermissionTest"); }
From source file:arena.utils.ReflectionUtils.java
public static Object getAttributeUsingGetter(String attributeName, Object entity) { try {/*from w w w. j av a2 s.co m*/ return PropertyUtils.getSimpleProperty(entity, attributeName); } catch (NoSuchMethodException err) { LogFactory.getLog(ReflectionUtils.class).error(err); throw new RuntimeException("Error in getter", err); } catch (IllegalAccessException err) { LogFactory.getLog(ReflectionUtils.class).error(err); throw new RuntimeException("Error in getter", err); } catch (InvocationTargetException err) { LogFactory.getLog(ReflectionUtils.class).error(err); throw new RuntimeException("Error in getter", err); } }
From source file:com.jpeterson.littles3.bo.GroupBaseTest.java
/** * Create the test case//from ww w . ja v a 2s . co m * * @param testName * name of the test case */ public GroupBaseTest(String testName) { super(testName); logger = LogFactory.getLog(this.getClass()); logger.debug("GroupBaseTest"); }