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.acciente.induction.init.RequestInterceptorInitializer.java

public static RequestInterceptor[] getRequestInterceptor(Config.RequestInterceptors oRequestInterceptorsConfig,
        ModelPool oModelPool, ClassLoader oClassLoader, ServletConfig oServletConfig)
        throws ClassNotFoundException, InvocationTargetException, ConstructorNotFoundException,
        ParameterProviderException, IllegalAccessException, InstantiationException {
    RequestInterceptor[] oRequestInterceptorArray;
    String sRequestInterceptorClassName;
    Log oLog;/*from w w  w. j a v  a 2 s  . com*/

    oLog = LogFactory.getLog(RequestInterceptorInitializer.class);

    oRequestInterceptorArray = new RequestInterceptor[oRequestInterceptorsConfig.getRequestInterceptorList()
            .size()];

    for (int i = 0; i < oRequestInterceptorsConfig.getRequestInterceptorList().size(); i++) {
        Config.RequestInterceptors.RequestInterceptor oRequestInterceptorConfig;

        oRequestInterceptorConfig = (Config.RequestInterceptors.RequestInterceptor) oRequestInterceptorsConfig
                .getRequestInterceptorList().get(i);

        sRequestInterceptorClassName = oRequestInterceptorConfig.getClassName();

        oLog.info("loading user-defined request interceptor: " + sRequestInterceptorClassName);

        Class oRequestInterceptorClass = oClassLoader.loadClass(sRequestInterceptorClassName);

        // attempt to find and call the single public constructor
        oRequestInterceptorArray[i] = (RequestInterceptor) ObjectFactory.createObject(oRequestInterceptorClass,
                new Object[] { oServletConfig, oRequestInterceptorConfig, oClassLoader },
                new InitializerParameterProvider(oModelPool, "request-interceptor-init"));
    }

    return oRequestInterceptorArray;
}

From source file:fr.cls.atoll.motu.processor.wps.TestVFS.java

public static void testBugDoReplicateFile() {

    StandardFileSystemManager standardFileSystemManager = new StandardFileSystemManager();
    standardFileSystemManager.setLogger(LogFactory.getLog(VFS.class));
    standardFileSystemManager.setClassLoader(TestVFS.class.getClassLoader());
    try {/*from w  w  w .java  2s .com*/
        URL configUrl = new URL(
                "file:/J:/dev/atoll-v2/atoll-motu/atoll-motu-library/src/main/resources/motuVFSProvider.xml");
        standardFileSystemManager.setConfiguration(configUrl);
        standardFileSystemManager.setCacheStrategy(CacheStrategy.ON_CALL);
        standardFileSystemManager.init();

        String uri = "jar:file:/C:/Documents%20and%20Settings/dearith/.m2/repository/org/jvnet/ogc/iso-19139-d_2006_05_04-schema/1.0.0-PATCH-CLS/iso-19139-d_2006_05_04-schema-1.0.0-PATCH-CLS.jar!/schema/iso19139";
        FileSystemOptions opts = new FileSystemOptions();

        FileObject fileObject = standardFileSystemManager.resolveFile(uri, opts);

    } catch (FileSystemException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }

}

From source file:com.glweb.module.forum.JUnitForumHelper.java

protected static Log getLogger() {
    if (null == _logger) {
        _logger = LogFactory.getLog(JUnitForumHelper.class);
    }//  w  w w .  ja v a  2 s.  co  m

    return _logger;
}

From source file:am.ik.yalf.logger.impl.LoggerAdapterImpl.java

public Object getLogger(Class<?> clazz) {
    return LogFactory.getLog(clazz);
}

From source file:business.controllers.RoleController.java

@RequestMapping(value = "/admin/roles", method = RequestMethod.GET)
public List<RoleRepresentation> getAll(Principal principal) {
    LogFactory.getLog(getClass()).info("GET /admin/roles (for user: " + principal.getName() + ")");
    List<RoleRepresentation> roles = new ArrayList<RoleRepresentation>();
    for (Role role : roleRepository.findAll()) {
        roles.add(new RoleRepresentation(role));
    }/* w ww  .ja v a2 s .  co m*/
    return roles;
}

From source file:fr.aliasource.webmail.server.proxy.client.http.AbstractProxyClient.java

protected AbstractProxyClient() {
    logger = LogFactory.getLog(getClass());
}

From source file:com.fatwire.dta.sscrawler.reporting.reports.WarningLevelLoggingReport.java

public WarningLevelLoggingReport(final String loggerName) {
    log = LogFactory.getLog(loggerName);
}

From source file:indexer.DocumentIndexerStrategy.java

public DocumentIndexerStrategy(String indexDirectory) throws IOException {
    dir = FSDirectory.open(Paths.get(indexDirectory));
    log = LogFactory.getLog(getClass());
    Runtime.getRuntime().addShutdownHook(new Thread(() -> {
        try {//from   w  ww  .  j  a v a2 s .  c om
            log.info("Closing index writer.");
            getWriter().close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }));
}

From source file:com.aspectran.core.util.logging.commons.JakartaCommonsLoggingImpl.java

public JakartaCommonsLoggingImpl(String clazz) {
    log = LogFactory.getLog(clazz);
}

From source file:com.google.cloud.bigtable.hbase.Logger.java

public Logger(Class<?> logClass) {
    this.log = LogFactory.getLog(logClass);
}