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:de.kopis.glacier.AbstractGlacierCommand.java

public AbstractGlacierCommand(final URL endpoint, final File credentials) throws IOException {
    this.log = LogFactory.getLog(this.getClass());

    this.credentials = new PropertiesCredentials(credentials);
    client = new AmazonGlacierClient(this.credentials);
    sqs = new AmazonSQSClient(this.credentials);
    sns = new AmazonSNSClient(this.credentials);

    setEndpoint(endpoint);// w  w w  .  j  a  v a  2 s .c o  m
}

From source file:com.adaptris.security.TestKeyStoreInfoChange.java

/** @see TestCase */
public TestKeyStoreInfoChange(String testName) {
    super(testName);
    if (logR == null) {
        logR = LogFactory.getLog(TestKeyStoreInfoChange.class);
    }//from w  w  w .j a v  a2 s.co m
}

From source file:fr.aliasource.webmail.book.BookManager.java

BookManager(ProxyConfiguration proxyConfiguration) {
    this.logger = LogFactory.getLog(getClass());
    this.proxyConfiguration = proxyConfiguration;
    groupIndex = new HashMap<String, IBookSource>();
    sources = new LinkedList<IBookSource>();
    groups = new LinkedList<ContactGroup>();
    registerPluginSources();//from  w ww .  java 2 s .  c  o m
    AllContacts allSource = new AllContacts(sources);

    registerSource(allSource);

    logger.info(
            "AddressBook Manager created with " + sources.size() + " source(s) (" + groups.size() + " groups)");
}

From source file:com.adaptris.http.HttpSessionImp.java

protected HttpSessionImp() {
    logR = LogFactory.getLog(this.getClass());
    socketLogger = Http.getSocketLogger();
    output = new ByteArrayOutputStream();
    httpRequestLine = new HttpRequest();
    httpResponseLine = new HttpResponse();
}

From source file:com.adaptris.security.TestCertificateHandler.java

/**
 * @see TestCase/*from w  ww  .j a  v a 2  s  .c  o m*/
 */
public TestCertificateHandler(String testName) {
    super(testName);
    if (logR == null) {
        logR = LogFactory.getLog(TestCertificateHandler.class);
    }
}

From source file:name.livitski.tools.springlet.Logging.java

public static Log logForClass(Class<?> clazz) {
    return LogFactory.getLog(clazz);
}

From source file:com.predic8.membrane.core.transport.http.HttpServerRunnable.java

public HttpServerRunnable(Socket socket, HttpTransport transport) throws IOException {
    this.exchange = new Exchange();
    exchange.setServerThread(this);
    log = LogFactory.getLog(HttpServerRunnable.class.getName());
    counter++;//from w  w  w  .j a va  2  s .co  m
    log.debug("New ServerThread created. " + counter);
    this.sourceSocket = socket;
    srcIn = new BufferedInputStream(sourceSocket.getInputStream(), 2048);
    srcOut = new BufferedOutputStream(sourceSocket.getOutputStream(), 2048);
    sourceSocket.setSoTimeout(transport.getSocketTimeout());
    sourceSocket.setTcpNoDelay(transport.isTcpNoDelay());
    this.transport = transport;
    setClientSettings();
}

From source file:gridool.mapred.db.DBMapReduceJob.java

@Override
public String reduce() throws GridException {
    final GridJobFuture<String> result = kernel.execute(DBReduceJob.class, jobConf);
    try {//  w w  w .j  ava  2  s. c o m
        return result.get();
    } catch (InterruptedException ie) {
        LogFactory.getLog(getClass()).error(ie.getMessage(), ie);
        throw new GridException(ie);
    } catch (ExecutionException ee) {
        LogFactory.getLog(getClass()).error(ee.getMessage(), ee);
        throw new GridException(ee);
    }
}

From source file:com.kite9.k9server.LoggingCustomizer.java

public LoggingCustomizer() {
    this(LogFactory.getLog(LoggingCustomizer.class));
}

From source file:com.amazonaws.regions.Regions.java

/**
 * Returns a Region object representing the region the application is
 * running in, when running in EC2. If this method is called from a non-EC2
 * environment, it will return null.//w ww  .j  av  a  2s  .  c  o m
 */
public static Region getCurrentRegion() {
    try {
        final String region = EC2MetadataUtils.getEC2InstanceRegion();
        if (region != null)
            return RegionUtils.getRegion(region);
    } catch (AmazonClientException e) {
        LogFactory.getLog(Regions.class).debug("Ignoring failure to retrieve the region: " + e.getMessage());
    }
    return null;
}