Example usage for org.apache.commons.logging LogFactory getLog

List of usage examples for org.apache.commons.logging LogFactory getLog

Introduction

In this page you can find the example usage for org.apache.commons.logging LogFactory getLog.

Prototype

public static Log getLog(String name) 

Source Link

Document

Convenience method to return a named logger.

Usage

From source file:com.ngdata.sep.util.io.Closer.java

/**
 * Closes anything {@link Closeable}, catches any throwable that might occur during closing and logs it as an error.
 *//*from  www.j  ava 2 s  . c om*/
public static void close(Closeable closeable) {
    if (closeable != null) {
        try {
            closeable.close();
        } catch (Throwable t) {
            Log log = LogFactory.getLog(Closer.class);
            log.error("Error closing object of type " + closeable.getClass().getName(), t);
        }
    }
}

From source file:au.com.shawware.sandbox.spring.BeanTest.java

/**
 * Set up the test harness before running any test.
 *//*from w ww  .ja v  a 2 s .  c o  m*/
@BeforeClass
public static void setUp() {
    sLog = LogFactory.getLog(BeanTest.class.getName());
    sContext = new ClassPathXmlApplicationContext(BEAN_FILE);
}

From source file:com.retroduction.carma.utilities.LoggerFactory.java

public static Logger getLogger(Class<?> clazz) {
    Log log = LogFactory.getLog(clazz);
    Logger logger = new Logger();
    logger.setLog(log);//  ww  w .ja  va 2s  .co  m
    return logger;
}

From source file:mangotiger.poker.pokerstars.PokerStarsTest.java

private static Log log() {
    return LogFactory.getLog(PokerStarsTest.class);
}

From source file:fedora.server.security.servletfilters.FilterSetup.java

public static final String getFilterNameAbbrev(String filterName) {
    LogFactory.getLog(FilterSetup.class).debug(">>>>>>>>>>>>>>>>>>" + filterName);
    String rc = filterName;// ww w . j  a v a 2  s. c  o  m
    if ("XmlUserfileFilter".equals(filterName)) {
        rc = "X";
    } else if ("PubcookieFilter".equals(filterName)) {
        rc = "P";
    } else if ("LdapFilter".equals(filterName)) {
        rc = "L";
    } else if ("LdapFilterForAttributes".equals(filterName)) {
        rc = "A";
    } else if ("LdapFilterForGroups".equals(filterName)) {
        rc = "G";
    }
    return rc;
}

From source file:edu.indiana.lib.twinpeaks.util.LogUtils.java

/**
 * Get a Log instance
 * @param logClass Java Class being logged
 */
public static Log getLog(Class logClass) {
    return LogFactory.getLog(logClass);
}

From source file:mangotiger.poker.Analyst.java

private static Log log() {
    return LogFactory.getLog(Analyst.class);
}

From source file:com.qagen.osfe.common.utils.Log.java

/**
 * Get a Log instance to perform logging within the Class specified.  Returns an instance
 * of this class which wraps an instance of the commons logging Log class.
 *
 * @param clazz the Class which is going to be doing the logging
 * @return a Log instance with which to log
 *///  w w  w  . j av  a  2  s.  com
public static Log getInstance(Class<?> clazz) {
    return new Log(LogFactory.getLog(clazz));
}

From source file:io.lightlink.utils.LogUtils.java

public static void warn(Class origin, String message, Throwable t) {

    LogFactory.getLog(origin).warn(message, t);

}

From source file:com.wavemaker.runtime.data.util.LoggingUtils.java

public static void logCannotRollbackTx(String loggerName, Throwable th) {
    logCannotRollbackTx(LogFactory.getLog(loggerName), th);
}