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.tudarmstadt.ukp.csniper.webapp.page.login.LoginPage.java

public LoginPage() {
    if (userRepository.list().isEmpty()) {
        User admin = new User();
        admin.setUsername(ADMIN_DEFAULT_USERNAME);
        admin.setPassword(ADMIN_DEFAULT_PASSWORD);
        admin.setEnabled(true);/*from  w w w. j  av  a  2 s .c  o m*/
        admin.setRoles(Role.getRoles());
        userRepository.create(admin);

        String msg = "No user accounts have been found. An admin account has been created: "
                + ADMIN_DEFAULT_USERNAME + "/" + ADMIN_DEFAULT_PASSWORD;
        info(msg);
        LogFactory.getLog(getClass()).info(msg);
    }

    add(new LoginForm("loginForm"));
}

From source file:com.ah.util.Tracer.java

public Tracer(Class<?> srcClass, String logger) {
    this.srcClass = srcClass.getSimpleName();

    if (logMaps.containsValue(logger)) {
        this.logger = LogFactory.getLog(logger);
    } else {/*from   w  w  w .  j  a  va 2s .  c om*/
        this.logger = LogFactory.getLog("tracerlog");
    }
}

From source file:com.alfaariss.oa.authentication.remote.saml2.profile.metadata.SPMetadata.java

/**
 * Constructor. 
 */
public SPMetadata() {
    _logger = LogFactory.getLog(SPMetadata.class);
}

From source file:fr.aliasource.webmail.proxy.ActionRegistry.java

public ActionRegistry(Controller c) {
    this.logger = LogFactory.getLog(getClass());
    this.c = c;
}

From source file:fr.aliasource.webmail.sending.SendAction.java

public SendAction() {
    logger = LogFactory.getLog(getClass());
    ANSWERED.add(Flag.ANSWERED);
}

From source file:gridool.deployment.GridGetClassTask.java

/**
 * @return outer class/*from  w  w w  .  j  av a 2  s  .  com*/
 */
private static ClassData addEnclosingClass(ClassData classData, Class<?> enclosingClass) throws GridException {
    final String clsName = enclosingClass.getName();
    final byte[] b;
    try {
        b = ClassUtils.getClassAsBytes(enclosingClass);
    } catch (IOException e) {
        String msg = "Failed serializing a class: " + enclosingClass.getName();
        LogFactory.getLog(GridGetClassTask.class).error(msg, e);
        throw new GridException(msg, e);
    }
    final long timestamp = ClassUtils.getLastModified(enclosingClass);
    ClassData outerClazz = new ClassData(clsName, b, timestamp);
    classData.setEnclosingClass(outerClazz);
    return outerClazz;
}

From source file:com.acciente.induction.dispatcher.model.ModelPool.java

public ModelPool(Config.ModelDefs oModelDefs, ModelFactory oModelFactory) throws MethodNotFoundException,
        InvocationTargetException, ClassNotFoundException, ConstructorNotFoundException,
        ParameterProviderException, IllegalAccessException, InstantiationException {
    _oModelDefs = oModelDefs;/*from ww  w . java2 s .  co m*/
    _oModelFactory = oModelFactory;
    _oAppScopeModelMap = new Hashtable(); // we use a hashtable instead of a HashMap for safe concurrent access

    Log oLog = LogFactory.getLog(ModelPool.class);

    // initialize the models set to initialize on startup
    for (Iterator oIter = oModelDefs.getModelDefList().iterator(); oIter.hasNext();) {
        Config.ModelDefs.ModelDef oModelDef = (Config.ModelDefs.ModelDef) oIter.next();

        if (oModelDef.isApplicationScope() && oModelDef.isInitOnStartUp()) {
            oLog.info("model-pool: initializing model: " + oModelDef.getModelClassName());

            getApplicationScopeModel(oModelDef, null);
        }
    }
}

From source file:de.tudarmstadt.ukp.dkpro.core.decompounding.splitter.AsvToolboxSplitterAlgorithm.java

public AsvToolboxSplitterAlgorithm() throws ResourceInitializationException {
    logger = LogFactory.getLog(this.getClass());

    splitter = new Zerleger2();
    try {//  w  ww. jav a2s  .  c o m
        File kompVVicTree = ResourceUtils.getUrlAsFile(
                getClass().getResource(
                        "/de/tudarmstadt/ukp/dkpro/core/decompounding/lib/splitter/de/" + "asv/kompVVic.tree"),
                false);

        File kompVHic = ResourceUtils.getUrlAsFile(
                getClass().getResource(
                        "/de/tudarmstadt/ukp/dkpro/core/decompounding/lib/splitter/de/" + "asv/kompVHic.tree"),
                false);

        File grfExt = ResourceUtils.getUrlAsFile(
                getClass().getResource(
                        "/de/tudarmstadt/ukp/dkpro/core/decompounding/lib/splitter/de/" + "asv/grfExt.tree"),
                false);

        splitter.init(kompVVicTree.getAbsolutePath(), kompVHic.getAbsolutePath(), grfExt.getAbsolutePath());
    } catch (IOException ioException) {
        throw new ResourceInitializationException(ioException);
    }

}

From source file:fr.aliasource.webmail.common.message.StoreMessageCommand.java

public StoreMessageCommand(IAccount account) {
    this.logger = LogFactory.getLog(getClass());
    this.account = account;
}

From source file:bdi4jade.examples.planselection.ExperimentRunner.java

public ExperimentRunner() {
    this.log = LogFactory.getLog(this.getClass());

    List<String> params = new ArrayList<String>();
    params.add("-gui");
    params.add("-detect-main:false");

    log.info("Plataform parameters: " + params);

    this.bootProfile = new BootProfileImpl(params.toArray(new String[0]));

    this.runtime = jade.core.Runtime.instance();
    PlatformController controller = runtime.createMainContainer(bootProfile);

    this.transportationAgent = new TransportationAgent();
    try {//from  w  ww  . j  av a  2 s  . c  o  m
        AgentController ac = ((AgentContainer) controller)
                .acceptNewAgent(transportationAgent.getClass().getSimpleName(), transportationAgent);
        ac.start();
    } catch (Exception e) {
        log.error(e);
    }

    this.iteration = 0;
}