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.glweb.infrastructure.persistence.hibernate.HibernateUtil.java

protected static Log getLogger() {
    if (null == _logger) {
        setLogger(LogFactory.getLog("com.glweb.infrastructure.persistence.hibernate.HibernateUtil"));
    }/*from   w w w. j  a  v a 2s.c om*/

    return _logger;
}

From source file:com.mindquarry.desktop.pool.PoolBase.java

private void initPool() {
    log = LogFactory.getLog(this.getClass());
    poolFolder = new File(PreferenceUtilities.SETTINGS_FOLDER + "/" //$NON-NLS-1$
            + POOL_FOLDER + "/" + name); //$NON-NLS-1$
    if (!poolFolder.exists()) {
        poolFolder.mkdirs();//from   w w w .  java2  s . co m
    }
}

From source file:com.sohlman.profiler.reporter.CommonsLoggingReporter.java

public CommonsLoggingReporter(long thresHoldMillis, String rowIdentifier, String thresholdReachedIdentifier,
        boolean isThresholdReportEnabled, String loggerName) {
    this(thresHoldMillis, rowIdentifier, thresholdReachedIdentifier, LogFactory.getLog(loggerName));
}

From source file:edu.umich.robot.soar.DropObjectCommand.java

public DropObjectCommand(Identifier wme, SoarAgent agent) {
    super(wme, agent, LogFactory.getLog(DropObjectCommand.class));

    addEvent(new EffectorDropObjectEvent(), AbstractEffectorEvent.class);
}

From source file:com.thinkberg.webdav.data.DavResource.java

protected boolean setPropertyValue(Element root, Element propertyEl) {
    LogFactory.getLog(getClass()).debug(String.format("[%s].set('%s')", object.getName(), propertyEl.asXML()));

    if (!ALL_PROPERTIES.contains(propertyEl.getName())) {
        final String nameSpace = propertyEl.getNamespaceURI();
        final String attributeName = getFQName(nameSpace, propertyEl.getName());
        try {/*from   ww w .ja  v a2 s  . co m*/
            FileContent objectContent = object.getContent();
            final String command = propertyEl.getParent().getParent().getName();
            if (TAG_PROP_SET.equals(command)) {
                StringWriter propertyValueWriter = new StringWriter();
                propertyEl.write(propertyValueWriter);
                propertyValueWriter.close();
                objectContent.setAttribute(attributeName, propertyValueWriter.getBuffer().toString());
            } else if (TAG_PROP_REMOVE.equals(command)) {
                objectContent.setAttribute(attributeName, null);
            }
            root.addElement(propertyEl.getQName());
            return true;
        } catch (IOException e) {
            LogFactory.getLog(getClass()).error(String.format("can't store attribute property '%s' = '%s'",
                    attributeName, propertyEl.asXML()), e);
        }
    }
    return false;
}

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

/** @see TestCase */
public SingleEntryKeystoreBase(String testName) {
    super(testName);
    logR = LogFactory.getLog(this.getClass());
}

From source file:edu.harvard.hms.dbmi.bd2k.irct.aws.event.result.S3AfterSaveResult.java

@Override
public void init(Map<String, String> parameters) {
    log = LogFactory.getLog("AWS S3 Monitoring");
    bucketName = parameters.get("Bucket Name");
    s3Folder = parameters.get("s3Folder");

    s3client = new AmazonS3Client(new InstanceProfileCredentialsProvider());
}

From source file:com.alfaariss.oa.engine.core.idp.storage.AbstractIDP.java

/**
 * Constructor. 
 */
public AbstractIDP() {
    _logger = LogFactory.getLog(this.getClass());
}

From source file:edu.vt.middleware.crypt.CryptProvider.java

/**
 * <p>This will add an additional security provider.</p>
 *
 * @param  provider  <code>Provider</code>
 * @param  name  <code>String</code>
 *///  ww w  . j  ava2  s .co  m
public static void addProvider(final Provider provider, final String name) {
    java.security.Security.addProvider(provider);

    final String[] tmp = new String[providers.length + 1];
    for (int i = 0; i < providers.length; i++) {
        tmp[i] = providers[i];
    }
    tmp[providers.length] = name;
    providers = tmp;

    final Log logger = LogFactory.getLog(CryptProvider.class);
    if (logger.isDebugEnabled()) {
        logger.debug("Added new security provider " + name);
    }
}

From source file:com.glweb.BaseObject.java

public Log getLogger() {
    if (null == _logger) {
        setLogger(LogFactory.getLog(getClass()));
    }

    return _logger;
}