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:fr.aliasource.webmail.common.uid.UIDFetchCommand.java

public UIDFetchCommand(IFolder folder, IAccount ac) {
    logger = LogFactory.getLog(getClass());
    this.ac = ac;
    this.folder = folder.getName();
}

From source file:fr.aliasource.index.core.impl.IndexManager.java

public IndexManager(IIndexingParameters params) {
    logger = LogFactory.getLog(getClass());
    typeIndexes = new HashMap<String, Index>();
    RunnableExtensionLoader<IIndexFactory> loader = new RunnableExtensionLoader<IIndexFactory>();
    List<IIndexFactory> factories = loader.loadExtensions(SearchActivator.PLUGIN_ID, "indexfactory",
            "index_factory", "implementation");
    if (factories.size() < 1) {
        logger.fatal("No IIndexFactory declared, abort");
        throw new RuntimeException("No IIndexFactory declared, abort");
    }// w ww . ja v a  2s  . c  o m
    factory = factories.get(0);
    factory.init(params);
}

From source file:com.jpeterson.util.http.RangeTest.java

/**
 * Create the test case/*from ww  w. j  a  v  a  2s .c o  m*/
 * 
 * @param testName
 *            name of the test case
 */
public RangeTest(String testName) {
    super(testName);

    logger = LogFactory.getLog(this.getClass());
    logger.debug("RangeTest");
}

From source file:fr.aliasource.webmail.ldap.BookSource.java

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

From source file:net.sf.housekeeper.Housekeeper.java

/**
 * Prevents instances of this class./*  www  .j a  v  a 2 s  .  c om*/
 */
private Housekeeper(String[] args) {
    LogFactory.getLog(Housekeeper.class).info("Starting Housekeeper " + VERSION);

    MainFrame.INSTANCE.show();
}

From source file:de.ufinke.cubaja.sql.Sequence.java

public Sequence(SequenceConfig config) throws Exception {

    this.config = config.clone();

    if (config.isLog()) {
        logger = LogFactory.getLog(Sequence.class);
    }//from  w  w w .  j a v  a  2 s  .com

    database = new Database(config.getDatabase());

    Sql sqlSelect = new Sql(getClass(), "sequence_select");
    sqlSelect.resolve("tableName", config.getTableName());
    sqlSelect.resolve("seqName", config.getSeqName());
    select = database.createQuery(sqlSelect);
    selectFirstValuePos = select.getColumnPosition("first_value");
    selectLastValuePos = select.getColumnPosition("last_value");

    Sql sqlLock = new Sql(getClass(), "sequence_lock");
    sqlLock.resolve("tableName", config.getTableName());
    sqlLock.resolve("seqName", config.getSeqName());
    lock = database.createUpdate(sqlLock);

    Sql sqlDelete = new Sql(getClass(), "sequence_delete");
    sqlDelete.resolve("tableName", config.getTableName());
    sqlDelete.resolve("seqName", config.getSeqName());
    delete = database.createUpdate(sqlDelete);
    deleteOldValuePos = delete.getVariablePositions("old_value")[0];

    Sql sqlUpdate = new Sql(getClass(), "sequence_update");
    sqlUpdate.resolve("tableName", config.getTableName());
    sqlUpdate.resolve("seqName", config.getSeqName());
    update = database.createUpdate(sqlUpdate);
    updateOldValuePos = update.getVariablePositions("old_value")[0];
    updateNewValuePos = update.getVariablePositions("new_value")[0];

    Sql sqlInsert = new Sql(getClass(), "sequence_insert");
    sqlInsert.resolve("tableName", config.getTableName());
    sqlInsert.resolve("seqName", config.getSeqName());
    insert = database.createUpdate(sqlInsert);
    insertFirstValuePos = insert.getVariablePositions("first_value")[0];
    insertLastValuePos = insert.getVariablePositions("last_value")[0];

    ResultSetMetaData meta = select.getMetaData();
    int precision = Math.min(18, meta.getPrecision(insertLastValuePos));
    maxValue = 1;
    for (int i = 0; i < precision; i++) {
        maxValue *= 10;
    }
    maxValue--;
    select.closeResultSet();
}

From source file:fr.aliasource.webmail.attachments.AttachmentsMetadataAction.java

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

From source file:com.jpeterson.littles3.bo.AllUsersGroupTest.java

/**
 * Create the test case//  w  w w.  ja v  a 2  s  .com
 * 
 * @param testName
 *            name of the test case
 */
public AllUsersGroupTest(String testName) {
    super(testName);

    logger = LogFactory.getLog(this.getClass());
    logger.debug("AllUsersGroupTest");
}

From source file:com.telefonica.euro_iaas.sdc.rest.aspects.TraceInterceptorTest.java

@Test
public void testWriteToLogLogStringThrowable() {
    Log log = LogFactory.getLog(TraceInterceptorTest.class);
    traceInterceptor.writeToLog(log, "message", new Exception());
}

From source file:com.jpeterson.util.http.RangeSetTest.java

/**
 * Create the test case//from w w w  .  jav  a2 s .  c om
 * 
 * @param testName
 *            name of the test case
 */
public RangeSetTest(String testName) {
    super(testName);

    logger = LogFactory.getLog(this.getClass());
    logger.debug("RangeSetTest");
}