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:edu.umich.robot.soar.SetVelocityCommand.java

public SetVelocityCommand(Identifier wme, SoarAgent agent) throws SoarCommandError {
    super(wme, agent.getEvents(), LogFactory.getLog(SetVelocityCommand.class));

    Double linear = null;//from  ww w.  j a v  a2s.co m
    Double angular = null;
    {
        String linvelString = wme.GetParameterValue(IOConstants.LINEAR_VELOCITY);
        String angvelString = wme.GetParameterValue(IOConstants.ANGULAR_VELOCITY);

        if (linvelString == null && angvelString == null)
            throw new SoarCommandError("Must have at least one of " + IOConstants.LINEAR_VELOCITY + " or "
                    + IOConstants.ANGULAR_VELOCITY + " on the command.");

        if (linvelString != null)
            linear = CommandParameters.requireDouble(wme, IOConstants.LINEAR_VELOCITY);

        if (angvelString != null)
            angular = CommandParameters.requireDouble(wme, IOConstants.ANGULAR_VELOCITY);
    }

    if (linear == null) {
        angular = agent.getProperties().get(AgentProperties.ANGULAR_SPEED_UNIT).fromView(angular);
        addEvent(new DriveAngularEvent(angular), AbstractDriveEvent.class);
    } else if (angular == null) {
        linear = agent.getProperties().get(AgentProperties.LINEAR_SPEED_UNIT).fromView(linear);
        addEvent(new DriveLinearEvent(linear), AbstractDriveEvent.class);
    } else {
        angular = agent.getProperties().get(AgentProperties.ANGULAR_SPEED_UNIT).fromView(angular);
        linear = agent.getProperties().get(AgentProperties.LINEAR_SPEED_UNIT).fromView(linear);
        addEvent(new DriveAngularEvent(angular), AbstractDriveEvent.class);
        addEvent(new DriveLinearEvent(linear), AbstractDriveEvent.class);
    }
}

From source file:es.mityc.firmaJava.libreria.xades.elementos.EncodingEnum.java

private EncodingEnum(String uri) {
    try {/*  w  ww  .  j ava  2 s.  c  o m*/
        this.uri = new URI(uri);
    } catch (URISyntaxException ex) {
        Log logger = LogFactory.getLog(EncodingEnum.class);
        logger.error("Error creando enumerado de encoding", ex);
    }
}

From source file:com.alfaariss.oa.helper.stylesheet.StyleSheetHelper.java

/**
 * Constructor.
 */
public StyleSheetHelper() {
    _logger = LogFactory.getLog(StyleSheetHelper.class);
    _engine = new StyleSheetEngine();
}

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

public DiffuseObjectCommand(Identifier wme, SoarAgent agent) throws SoarCommandError {
    super(wme, agent, LogFactory.getLog(DiffuseObjectCommand.class));

    id = CommandParameters.requireInteger(wme, IOConstants.ID);

    agent.getRobotOutput().addFeedbackEventListener(AbstractEffectorFeedbackEvent.class, listener);

    addEvent(new EffectorDiffuseObjectEvent(id), AbstractEffectorEvent.class);
}

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

public DiffuseObjectByWireCommand(Identifier wme, SoarAgent agent) throws SoarCommandError {
    super(wme, agent, LogFactory.getLog(DiffuseObjectByWireCommand.class));

    id = CommandParameters.requireInteger(wme, IOConstants.ID);
    color = CommandParameters.requireString(wme, IOConstants.COLOR);

    addEvent(new EffectorDiffuseObjectByWireEvent(id, color), AbstractEffectorEvent.class);
}

From source file:fr.aliasource.webmail.common.folders.ListSubscribedFoldersCommand.java

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

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

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

    s3client = new AmazonS3Client(new InstanceProfileCredentialsProvider());

}

From source file:com.alfaariss.oa.authentication.password.digest.TracDigest.java

/**
 * Constructor. Initialize it with MD5
 */
public TracDigest() {
    super("MD5");

    _logger = LogFactory.getLog(this.getClass());
}

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

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

From source file:com.liulangf.pattern.gof.behavioral.chain.jakarta.simple.ExampleServlet.java

/**
 * <p>Cache the name of the servlet.</p>
 *
 * @exception ServletException if an initialization error occurs
 *//*from  w  w w  . ja  v a2  s  .c o  m*/
public void init() throws ServletException {
    super.init();
    Log log = LogFactory.getLog(ExampleServlet.class);
    servletName = getServletConfig().getServletName();
    if (log.isInfoEnabled()) {
        log.info("Initializing chain example servlet '" + servletName + "'");
    }
}