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.openedit.users.BaseGroup.java

private Log getLog() {
    if (log == null) {
        log = LogFactory.getLog(BaseGroup.class);
    }
    return log;
}

From source file:fr.aliasource.webmail.common.cache.SignatureCache.java

public SignatureCache(IAccount account) {
    super(account, null, TABLE_NAME);
    this.logger = LogFactory.getLog(getClass());
}

From source file:fr.aliasource.webmail.disposition.DispositionNotificationAction.java

public DispositionNotificationAction() {
    this.logger = LogFactory.getLog(getClass());
}

From source file:edu.harvard.hms.dbmi.bd2k.irct.ws.rs.resultconverter.XMLTabularDataConverter.java

public XMLTabularDataConverter() {
    log = LogFactory.getLog("XML Tabular Data Converter");
}

From source file:gov.nih.nci.ncicb.cadsr.bulkloader.util.DBTestCase.java

public DBTestCase(URL dataURL) {
    log = LogFactory.getLog("test.junit");
    this.dataURL = dataURL;
}

From source file:com.jpeterson.littles3.dao.je.JeCentral.java

public JeCentral() {
    logger = LogFactory.getLog(this.getClass());
}

From source file:fr.aliasource.webmail.common.cache.DatabaseCache.java

protected DatabaseCache(IAccount account, IDirectCommand<W> command, String tableName) {
    super(account);
    this.logger = LogFactory.getLog(getClass());
    this.command = command;
    this.ds = account.getCache().getDataStore();
    this.tableName = tableName;
    exists = false;//from  w w w.ja va2 s  .c  om
    memoryCacheEnabled = false;
}

From source file:com.alfaariss.oa.util.saml2.opensaml.CustomOpenSAMLSecurityConfigurationBootstrap.java

/**
 * Populate signature-related parameters.
 * /*  ww w .j  a  v  a2 s  . com*/
 * @param config the security configuration to populate
 */
protected static void populateSignatureParams(BasicSecurityConfiguration config) {
    Log logger = LogFactory.getLog(CustomOpenSAMLSecurityConfigurationBootstrap.class);
    CryptoManager cryptoManager = Engine.getInstance().getCryptoManager();
    String sSignatureAlgorithmURI = SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA1;
    String sMessageDigestAlgorithmURI = SignatureConstants.ALGO_ID_DIGEST_SHA1;

    try {
        sSignatureAlgorithmURI = SAML2CryptoUtils.getXMLSignatureURI(cryptoManager);
    } catch (OAException e) {
        logger.warn("Could not resolve signature algorithm from OA Crypto configuration, using default: "
                + sSignatureAlgorithmURI);
    }

    try {
        sMessageDigestAlgorithmURI = SAML2CryptoUtils.getXMLDigestMethodURI(cryptoManager.getMessageDigest());
    } catch (OAException e) {
        logger.warn("Could not resolve digest algorithm from OA Crypto configuration, using default: "
                + sMessageDigestAlgorithmURI);
    }

    // Asymmetric key algorithms
    config.registerSignatureAlgorithmURI("RSA", sSignatureAlgorithmURI);
    config.registerSignatureAlgorithmURI("DSA", SignatureConstants.ALGO_ID_SIGNATURE_DSA);
    config.registerSignatureAlgorithmURI("ECDSA", SignatureConstants.ALGO_ID_SIGNATURE_ECDSA_SHA1);

    // HMAC algorithms
    config.registerSignatureAlgorithmURI("AES", SignatureConstants.ALGO_ID_MAC_HMAC_SHA1);
    config.registerSignatureAlgorithmURI("DESede", SignatureConstants.ALGO_ID_MAC_HMAC_SHA1);

    // Other signature-related params
    config.setSignatureCanonicalizationAlgorithm(SignatureConstants.ALGO_ID_C14N_EXCL_OMIT_COMMENTS);
    config.setSignatureHMACOutputLength(null);
    config.setSignatureReferenceDigestMethod(sMessageDigestAlgorithmURI);
}

From source file:com.amazonaws.logging.ApacheCommonsLogging.java

/**
 * @param logString the string tag/*from   ww  w . j  av  a2  s. c  o  m*/
 */
public ApacheCommonsLogging(String logString) {
    this.logString = logString;
    this.log = LogFactory.getLog(logString);
}

From source file:eu.semaine.jms.JMSLogReader.java

@Override
public void onMessage(Message m) {
    try {/*w  w w  .j  ava 2s .  c o m*/
        if (!(m instanceof TextMessage)) {
            return; // silently ignore
        }
        String dest = m.getJMSDestination().toString();
        // dest is expected to have the form
        // semaine.log.component.log-level
        String[] parts = dest.split("\\.");
        String level = parts[parts.length - 1].toLowerCase();
        String component = parts[parts.length - 2];
        Log log = LogFactory.getLog("semaine.log." + component);
        String text = ((TextMessage) m).getText();
        //text = time.format(new Date(m.getJMSTimestamp())) + " " + text;
        if (level.equals("info"))
            log.info(text);
        else if (level.equals("warn"))
            log.warn(text);
        else if (level.equals("error"))
            log.error(text);
        else if (level.equals("debug"))
            log.debug(text);
        else
            log.info(text);
    } catch (Exception e) {

    }
}