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.jpeterson.littles3.bo.AcpTest.java

/**
 * Create the test case/*www  .ja v  a2 s. co m*/
 * 
 * @param testName
 *            name of the test case
 */
public AcpTest(String testName) {
    super(testName);

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

From source file:mangotiger.util.EventBus.java

private static Log log() {
    return LogFactory.getLog(EventBus.class);
}

From source file:com.adaptris.http.HttpRequest.java

/** @see Object#Object()
 * // w  w w.  j a va2  s.  c  om
 *
 */
public HttpRequest() {
    method = "GET";
    version = Http.VERSION_1;
    uri = "/";
    logR = LogFactory.getLog(this.getClass());
}

From source file:com.miraclelinux.historygluon.BasicStorageDriver.java

public BasicStorageDriver(String[] args) {
    m_args = new String[args.length];
    System.arraycopy(args, 0, m_args, 0, args.length);
    m_log = LogFactory.getLog(BasicStorageDriver.class);
}

From source file:com.miraclelinux.historygluon.MemDriver.java

public MemDriver(String[] args) {
    super(args);
    m_log = LogFactory.getLog(MemDriver.class);
}

From source file:de.huberlin.wbi.cuneiform.core.actormodel.Actor.java

public Actor() {
    inbox = new ArrayList<>();
    log = LogFactory.getLog(Actor.class);
}

From source file:com.lfv.yada.net.PacketPool.java

private PacketPool() {
    // Create a logger for this class
    log = LogFactory.getLog(getClass());
    pool = new StackObjectPool(new BasePoolableObjectFactory() {
        public Object makeObject() throws Exception {
            return new Packet(PACKET_LENGTH);
        }//from  w w w. j a va2s .c  o m
    });

    //debugList = new LinkedList<DebugEntry>();
}

From source file:com.curl.orb.servlet.InvokeHttpSessionServlet.java

@Override
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException {
    super.doPost(request, response);
    Log log = LogFactory.getLog(getClass());
    InvokeHttpSessionRequest invokeRequest = (InvokeHttpSessionRequest) InstanceManagementUtil
            .getRequest(request);//from  w w  w  .  jav  a2 s.  c o  m
    try {
        String methodName = invokeRequest.getMethodName();
        Object[] arguments = invokeRequest.getArguments();
        Object returnValue = null;
        Method method = null;
        HttpSession session = request.getSession(false);
        if (invokeRequest.getObjectId() == null) {
            // static method
            if (invokeRequest.getClass() == null)
                throw new InstanceManagementException("Does not exist class name and object id.");
            String className = invokeRequest.getClassName();
            // security
            Class<?> cls = Class.forName(className);
            RemoteServiceAnnotationChecker.check(cls, environment);
            Object[] switchedArguments = switchRemoteObject(arguments, session);
            method = InstanceManagementUtil.getStaticMethod(cls, methodName, switchedArguments);
            returnValue = InstanceManagementUtil.invokeStaticMethod(method, cls, switchedArguments);
            // debug
            log.debug("Request invoke static method(HttpSession)");
        } else {
            // non static method
            if (session == null)
                throw new InstanceManagementException("Does not exist HttpSession.");
            Object obj = session.getAttribute(invokeRequest.getObjectId());
            // security
            RemoteServiceAnnotationChecker.check(obj.getClass(), environment);
            Object[] switchedArguments = switchRemoteObject(arguments, session);
            method = InstanceManagementUtil.getMethod(obj, methodName, switchedArguments);
            returnValue = InstanceManagementUtil.invokeMethod(method, obj, switchedArguments);
            // debug
            log.debug("Request invoke method(HttpSession)");
        }
        InstanceManagementUtil.setResponse(request, returnValue,
                InstanceManagementUtil.getSurborinateObject(method));
    }
    // IOException, SerializerException, InstanceManagementException ...etc
    catch (Exception e) {
        InstanceManagementUtil.setResponse(request, e, null);
    }
}

From source file:com.curl.orb.context.ApplicationContextFactory.java

/**
 * Create new ApplicationContextFactory instance or get existed one if it exists.
 *
 * @param context ServletContext/*from   w  w  w.j av  a  2s.  co  m*/
 * @return ApplicationContextFactory instance
 */
public static ApplicationContextFactory getInstance(ServletContext context) {
    if (ApplicationContextFactory.instance == null) {
        try {
            ApplicationContextFactory.instance = new ApplicationContextFactory(context);
        } catch (ApplicationContextException e) {
            // fatal log
            (LogFactory.getLog(ApplicationContextFactory.class)).fatal(e.getMessage(), e);
        }
    }
    return ApplicationContextFactory.instance;
}

From source file:gridool.dht.ops.DropOperation.java

public Serializable execute(ILocalDirectory directory) throws GridException {
    if (idxNames.length > 0) {
        try {//from www .j a va  2  s  .c om
            directory.drop(idxNames);
        } catch (IndexException e) {
            LogFactory.getLog(getClass()).error(e.getMessage(), e);
            throw new GridException(e);
        }
    }
    return null;
}