/**
* Enumeration describing the major events that the container can invoke
* the CometProcessors event() method with
- * BEGIN - will be called by the main service method of the servlet at the beginning
+ * BEGIN - will be called at the beginning
* of the processing of the connection. It can be used to initialize any relevant
* fields using the request and response objects. Between the end of the processing
* of this event, and the beginning of the processing of the end or error events,
/**
* Event details
- * TIMEOUT - the connection timed out (sub type of ERROR)
+ * TIMEOUT - the connection timed out (sub type of ERROR); note that this ERROR type is not fatal, and
+ * the connection will not be closed unless the servlet uses the close method of the event
* CLIENT_DISCONNECT - the client connection was closed (sub type of ERROR)
* IOEXCEPTION - an IO exception occurred, such as invalid content, for example, an invalid chunk block (sub type of ERROR)
* WEBAPP_RELOAD - the webapplication is being reloaded (sub type of END)
import javax.servlet.ServletException;
import javax.naming.directory.DirContext;
-import org.apache.commons.logging.Log;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
+import org.apache.juli.logging.Log;
/**
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
import org.apache.catalina.valves.ValveBase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
import org.apache.catalina.connector.Response;
import org.apache.catalina.deploy.LoginConfig;
import org.apache.catalina.util.Base64;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.ByteChunk;
import org.apache.tomcat.util.buf.CharChunk;
import org.apache.tomcat.util.buf.MessageBytes;
import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.catalina.Realm;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.deploy.LoginConfig;
import org.apache.catalina.util.MD5Encoder;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.deploy.LoginConfig;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.coyote.ActionCode;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.ByteChunk;
import org.apache.tomcat.util.buf.CharChunk;
import org.apache.tomcat.util.buf.MessageBytes;
import org.apache.catalina.core.StandardEngine;
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.coyote.Adapter;
import org.apache.coyote.ProtocolHandler;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.http.mapper.Mapper;
import org.apache.tomcat.util.modeler.Registry;
import org.apache.catalina.Globals;
import org.apache.catalina.Wrapper;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.coyote.ActionCode;
import org.apache.coyote.Adapter;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.B2CConverter;
import org.apache.tomcat.util.buf.ByteChunk;
import org.apache.tomcat.util.buf.CharChunk;
import javax.management.ObjectInstance;
import javax.management.ObjectName;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.http.mapper.Mapper;
import org.apache.catalina.connector.ResponseFacade;
import org.apache.catalina.util.InstanceSupport;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
* Standard implementation of <code>RequestDispatcher</code> that allows a
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
import org.apache.catalina.connector.Response;
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.naming.resources.ProxyDirContext;
import org.apache.tomcat.util.modeler.Registry;
public abstract class ContainerBase
implements Container, Lifecycle, Pipeline, MBeanRegistration, Serializable {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( ContainerBase.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( ContainerBase.class );
/**
* Perform addChild with the permissions of this class.
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
import org.apache.catalina.deploy.ContextTransaction;
import org.apache.catalina.deploy.NamingResources;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.naming.ContextAccessController;
import org.apache.naming.ContextBindings;
import org.apache.naming.EjbRef;
import org.apache.catalina.util.ExtensionValidator;
import org.apache.catalina.util.RequestUtil;
import org.apache.catalina.util.URLEncoder;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.naming.ContextBindings;
import org.apache.naming.resources.BaseDirContext;
import org.apache.naming.resources.DirContextURLStreamHandler;
import org.apache.catalina.Service;
import org.apache.catalina.realm.JAASRealm;
import org.apache.catalina.util.ServerInfo;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
import org.apache.tomcat.util.modeler.modules.MbeansSource;
{
/* Why do we implement deployer and delegate to deployer ??? */
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( StandardHost.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( StandardHost.class );
// ----------------------------------------------------------- Constructors
import org.apache.catalina.util.RequestUtil;
import org.apache.catalina.util.StringManager;
import org.apache.catalina.valves.ValveBase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
import org.apache.catalina.valves.ValveBase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
import org.apache.catalina.util.ServerInfo;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.StringCache;
import org.apache.tomcat.util.modeler.Registry;
import org.apache.catalina.connector.Connector;
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
extends ContainerBase
implements ServletConfig, Wrapper, NotificationEmitter {
- protected static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( StandardWrapper.class );
+ protected static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( StandardWrapper.class );
protected static final String[] DEFAULT_SERVLET_METHODS = new String[] {
"GET", "HEAD", "POST" };
import org.apache.catalina.connector.Response;
import org.apache.catalina.util.StringManager;
import org.apache.catalina.valves.ValveBase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.MessageBytes;
import org.apache.tomcat.util.log.SystemLogHandler;
import org.apache.catalina.util.RequestUtil;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import java.io.Serializable;
import org.apache.catalina.Valve;
import org.apache.catalina.tribes.Channel;
import org.apache.catalina.tribes.Member;
-import org.apache.commons.logging.Log;
+import org.apache.juli.logging.Log;
*/
public abstract class ClusterListener implements ChannelListener {
- public static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ClusterListener.class);
+ public static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(ClusterListener.class);
//--Instance Variables--------------------------------------
*/
public class ReplicatedContext extends StandardContext {
private int mapSendOptions = Channel.SEND_OPTIONS_DEFAULT;
- public static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( ReplicatedContext.class );
+ public static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog( ReplicatedContext.class );
protected static long DEFAULT_REPL_TIMEOUT = 15000;//15 seconds
*/
public class FarmWarDeployer extends ClusterListener implements ClusterDeployer, FileChangeListener {
/*--Static Variables----------------------------------------*/
- public static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
+ public static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory
.getLog(FarmWarDeployer.class);
/**
* The descriptive information about this implementation.
*/
public class FileMessageFactory {
/*--Static Variables----------------------------------------*/
- public static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
+ public static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory
.getLog(FileMessageFactory.class);
/**
public class WarWatcher {
/*--Static Variables----------------------------------------*/
- public static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
+ public static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory
.getLog(WarWatcher.class);
/*--Instance Variables--------------------------------------*/
*/
public class BackupManager extends StandardManager implements ClusterManager
{
- public static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( BackupManager.class );
+ public static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog( BackupManager.class );
protected static long DEFAULT_REPL_TIMEOUT = 15000;//15 seconds
public class DeltaManager extends ClusterManagerBase{
// ---------------------------------------------------- Security Classes
- public static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DeltaManager.class);
+ public static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(DeltaManager.class);
/**
* The string manager for this package.
public class DeltaRequest implements Externalizable {
- public static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog( DeltaRequest.class );
+ public static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog( DeltaRequest.class );
/**
* The string manager for this package.
public class DeltaSession extends StandardSession implements Externalizable,ClusterSession,ReplicatedMapEntry {
- public static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DeltaSession.class);
+ public static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(DeltaSession.class);
/**
* The string manager for this package.
public class JvmRouteBinderValve extends ValveBase implements ClusterValve, Lifecycle {
/*--Static Variables----------------------------------------*/
- public static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
+ public static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory
.getLog(JvmRouteBinderValve.class);
/**
import org.apache.catalina.ha.CatalinaCluster;
import org.apache.catalina.ha.ClusterListener;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.ManagedBean;
import org.apache.tomcat.util.modeler.Registry;
*/
public class SimpleTcpReplicationManager extends StandardManager implements ClusterManager
{
- public static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( SimpleTcpReplicationManager.class );
+ public static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog( SimpleTcpReplicationManager.class );
//the channel configuration
protected String mChannelConfig = null;
public class ReplicationValve
extends ValveBase implements ClusterValve {
- private static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog( ReplicationValve.class );
+ private static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog( ReplicationValve.class );
// ----------------------------------------------------- Instance Variables
import org.apache.catalina.tribes.group.GroupChannel;
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.IntrospectionUtils;
/**
implements Reloader, Lifecycle
{
- protected static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( WebappClassLoader.class );
+ protected static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( WebappClassLoader.class );
protected class PrivilegedFindResource
implements PrivilegedAction {
IntrospectionUtils.clear();
// Clear the classloader reference in common-logging
- org.apache.commons.logging.LogFactory.release(this);
+ org.apache.juli.logging.LogFactory.release(this);
// Clear the classloader reference in the VM's bean introspector
java.beans.Introspector.flushCaches();
}
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( WebappLoader.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( WebappLoader.class );
private ObjectName oname;
private MBeanServer mserver;
import org.apache.catalina.Role;
import org.apache.catalina.User;
import org.apache.catalina.UserDatabase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
public class MBeanFactory extends BaseModelMBean {
- private static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(MBeanFactory.class);
+ private static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog(MBeanFactory.class);
/**
* The <code>MBeanServer</code> for this application.
import org.apache.catalina.deploy.ContextResourceLink;
import org.apache.catalina.deploy.NamingResources;
import org.apache.catalina.valves.ValveBase;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.modeler.ManagedBean;
import org.apache.tomcat.util.modeler.Registry;
import org.apache.catalina.deploy.ContextResource;
import org.apache.catalina.deploy.ContextResourceLink;
import org.apache.catalina.deploy.NamingResources;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
import javax.security.auth.callback.UnsupportedCallbackException;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
* <p>Implementation of the JAAS <code>CallbackHandler</code> interface,
import org.apache.catalina.deploy.SecurityConstraint;
import org.apache.catalina.util.RequestUtil;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.digester.Digester;
import org.apache.catalina.Container;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
import org.apache.catalina.Container;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.digester.Digester;
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.MD5Encoder;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
/**
public final class SecurityConfig{
private static SecurityConfig singleton = null;
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( SecurityConfig.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( SecurityConfig.class );
private final static String PACKAGE_ACCESS = "sun.,"
*/
private static HashMap objectCache = new HashMap();
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( SecurityUtil.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( SecurityUtil.class );
private static String PACKAGE = "org.apache.catalina.security";
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.core.StandardHost;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
import org.apache.catalina.Session;
import org.apache.catalina.Store;
import org.apache.catalina.util.LifecycleSupport;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.catalina.security.SecurityUtil;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
* Extends the <b>ManagerBase</b> class to implement most of the
* functionality required by a Manager which supports any kind of
import javax.management.ObjectName;
import org.apache.catalina.security.SecurityClassLoad;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
}
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( Catalina.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( Catalina.class );
}
// ------------------------------------------------------- Static Variables
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( CatalinaProperties.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( CatalinaProperties.class );
private static Properties properties = null;
import java.util.ArrayList;
import org.apache.catalina.loader.StandardClassLoader;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
import org.apache.tomcat.util.digester.Digester;
import org.apache.tomcat.util.digester.RuleSetBase;
import java.lang.reflect.Constructor;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.Log;
+
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+
import java.lang.reflect.InvocationTargetException;
public class ClusterRuleSetFactory {
public class ContextConfig
implements LifecycleListener {
- protected static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( ContextConfig.class );
+ protected static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( ContextConfig.class );
// ----------------------------------------------------- Instance Variables
/**
* The log.
*/
- protected static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(DigesterFactory.class);
+ protected static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog(DigesterFactory.class);
/**
* The XML entiry resolver used by the Digester.
import org.apache.catalina.security.SecurityConfig;
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.log.SystemLogHandler;
implements LifecycleListener {
- protected static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( EngineConfig.class );
+ protected static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( EngineConfig.class );
// ----------------------------------------------------- Instance Variables
import org.apache.catalina.Host;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
* Expand out a WAR in a Host's appBase.
public class HostConfig
implements LifecycleListener {
- protected static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( HostConfig.class );
+ protected static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( HostConfig.class );
// ----------------------------------------------------- Instance Variables
// Names of JARs that are known not to contain any TLDs
private static HashSet noTldJars;
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( TldConfig.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( TldConfig.class );
private static final String FILE_URL_PREFIX = "file:";
private static final int FILE_URL_PREFIX_LEN = FILE_URL_PREFIX.length();
import java.lang.reflect.Method;
import java.util.ArrayList;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
implements LifecycleListener {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( UserConfig.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( UserConfig.class );
// ----------------------------------------------------- Instance Variables
public abstract class ChannelInterceptorBase implements ChannelInterceptor {
- protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(
+ protected static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(
ChannelInterceptorBase.class);
private ChannelInterceptor next;
* @version 1.0
*/
public static class HeartbeatThread extends Thread {
- protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(HeartbeatThread.class);
+ protected static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(HeartbeatThread.class);
protected static int counter = 1;
protected static synchronized int inc() {
return counter++;
* @author Filip Hanik
*/
public class RpcChannel implements ChannelListener{
- protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(RpcChannel.class);
+ protected static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(RpcChannel.class);
public static final int FIRST_REPLY = 1;
public static final int MAJORITY_REPLY = 2;
*/\r
public class DomainFilterInterceptor extends ChannelInterceptorBase {\r
\r
- private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( DomainFilterInterceptor.class );\r
+ private static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog( DomainFilterInterceptor.class );\r
\r
protected Membership membership = null;\r
\r
* @version 1.0
*/
public class FragmentationInterceptor extends ChannelInterceptorBase {
- private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( FragmentationInterceptor.class );
+ private static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog( FragmentationInterceptor.class );
protected HashMap fragpieces = new HashMap();
private int maxSize = 1024*100;
* @version 1.0
*/
public class MessageDispatchInterceptor extends ChannelInterceptorBase implements Runnable {
- protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(MessageDispatchInterceptor.class);
+ protected static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(MessageDispatchInterceptor.class);
protected long maxQueueSize = 1024*1024*64; //64MB
protected FastQueue queue = new FastQueue();
*/
public class TcpFailureDetector extends ChannelInterceptorBase {
- private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( TcpFailureDetector.class );
+ private static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog( TcpFailureDetector.class );
protected static byte[] TCP_FAIL_DETECT = new byte[] {
79, -89, 115, 72, 121, -126, 67, -55, -97, 111, -119, -128, -95, 91, 7, 20,
* @version 1.0
*/
public class ThroughputInterceptor extends ChannelInterceptorBase {
- protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ThroughputInterceptor.class);
+ protected static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(ThroughputInterceptor.class);
double mbTx = 0;
double mbAppTx = 0;
public static final byte[] START_DATA = new byte[] {113, 1, -58, 2, -34, -60, 75, -78, -101, -12, 32, -29, 32, 111, -40, 4};
public static final byte[] END_DATA = new byte[] {54, -13, 90, 110, 47, -31, 75, -24, -81, -29, 36, 52, -58, 77, -110, 56};
- private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(TwoPhaseCommitInterceptor.class);
+ private static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(TwoPhaseCommitInterceptor.class);
protected HashMap messages = new HashMap();
protected long expire = 1000 * 60; //one minute expiration
*/
package org.apache.catalina.tribes.io;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.Log;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
*
*/\r
public class ObjectReader {\r
\r
- protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ObjectReader.class);\r
+ protected static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(ObjectReader.class);\r
\r
private XByteBuffer buffer;\r
\r
public class XByteBuffer
{
- public static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog( XByteBuffer.class );
+ public static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog( XByteBuffer.class );
/**
* This is a package header, 7 bytes (FLT2002)
public class McastService implements MembershipService,MembershipListener {
- private static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog( McastService.class );
+ private static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog( McastService.class );
/**
* The string manager for this package.
*/
public class McastServiceImpl
{
- private static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog( McastService.class );
+ private static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog( McastService.class );
protected static int MAX_PACKET_SIZE = 65535;
/**
import org.apache.catalina.tribes.group.RpcChannel;
import org.apache.catalina.tribes.io.XByteBuffer;
import org.apache.catalina.tribes.membership.MemberImpl;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.catalina.tribes.util.Arrays;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+
import java.util.ConcurrentModificationException;
/**
*/
public class LazyReplicatedMap extends AbstractReplicatedMap
implements RpcCallback, ChannelListener, MembershipListener {
- protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(LazyReplicatedMap.class);
+ protected static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(LazyReplicatedMap.class);
*/
public class ReplicatedMap extends AbstractReplicatedMap implements RpcCallback, ChannelListener, MembershipListener {
- protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ReplicatedMap.class);
+ protected static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(ReplicatedMap.class);
//------------------------------------------------------------------------------
// CONSTRUCTORS / DESTRUCTORS
import org.apache.catalina.tribes.ChannelReceiver;
import org.apache.catalina.tribes.MessageListener;
import org.apache.catalina.tribes.io.ListenCallback;
-import org.apache.commons.logging.Log;
+import org.apache.juli.logging.Log;
/**
* <p>Title: </p>
public static final int OPTION_DIRECT_BUFFER = 0x0004;
- protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ReceiverBase.class);
+ protected static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(ReceiverBase.class);
private MessageListener listener;
private String host = "auto";
* @version $Revision: 379956 $ $Date: 2006-02-22 16:57:35 -0600 (Wed, 22 Feb 2006) $
*/
public class ReplicationTransmitter implements ChannelSender {
- private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ReplicationTransmitter.class);
+ private static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(ReplicationTransmitter.class);
/**
* The descriptive information about this implementation.
*/
public class BioReceiver extends ReceiverBase implements Runnable, ChannelReceiver, ListenCallback {
- protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(BioReceiver.class);
+ protected static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(BioReceiver.class);
protected ServerSocket serverSocket;
public class BioReplicationThread extends WorkerThread {
- protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( BioReplicationThread.class );
+ protected static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog( BioReplicationThread.class );
protected Socket socket;
protected ObjectReader reader;
*/
public class BioSender extends AbstractSender implements DataSender {
- private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(BioSender.class);
+ private static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(BioSender.class);
/**
* The string manager for this package.
*/
public class FastQueue {
- private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(FastQueue.class);
+ private static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(FastQueue.class);
/**
* This is the actual queue
*/\r
public class NioReceiver extends ReceiverBase implements Runnable, ChannelReceiver, ListenCallback {\r
\r
- protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(NioReceiver.class);\r
+ protected static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(NioReceiver.class);\r
\r
/**\r
* The string manager for this package.\r
*/\r
public class NioReplicationThread extends WorkerThread {\r
\r
- private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog( NioReplicationThread.class );\r
+ private static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog( NioReplicationThread.class );\r
\r
private ByteBuffer buffer = null;\r
private SelectionKey key;\r
*/
public class NioSender extends AbstractSender implements DataSender{
- protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(NioSender.class);
+ protected static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(NioSender.class);
*/
public class ParallelNioSender extends AbstractSender implements MultiPointSender {
- protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(ParallelNioSender.class);
+ protected static org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(ParallelNioSender.class);
protected long selectTimeout = 5000; //default 5 seconds, same as send timeout
protected Selector selector;
protected HashMap nioSenders = new HashMap();
*/
package org.apache.catalina.tribes.util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
*
* Simple class that holds references to global loggers
private ResourceBundle bundle;
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( StringManager.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( StringManager.class );
/**
* Creates a new StringManager for a given package. This is a
import org.apache.catalina.User;
import org.apache.catalina.UserDatabase;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.digester.Digester;
import org.apache.tomcat.util.digester.ObjectCreationFactory;
import org.xml.sax.Attributes;
*/
public final class ExtensionValidator {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog(ExtensionValidator.class);
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog(ExtensionValidator.class);
/**
* The string resources for this package.
private ResourceBundle bundle;
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( StringManager.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( StringManager.class );
/**
* Creates a new StringManager for a given package. This is a
import org.apache.catalina.util.LifecycleSupport;
import org.apache.catalina.util.ServerInfo;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
+import org.apache.juli.logging.Log;
/**
import org.apache.catalina.connector.Response;
import org.apache.catalina.core.ContainerBase;
import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
/**
* Logger.
*/
- protected static org.apache.commons.logging.Log log
- = org.apache.commons.logging.LogFactory.getLog(AjpAprProcessor.class);
+ protected static org.apache.juli.logging.Log log
+ = org.apache.juli.logging.LogFactory.getLog(AjpAprProcessor.class);
/**
* The string manager for this package.
implements ProtocolHandler, MBeanRegistration {
- protected static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(AjpAprProtocol.class);
+ protected static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog(AjpAprProtocol.class);
/**
* The string manager for this package.
public class AjpMessage {
- protected static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(AjpMessage.class);
+ protected static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog(AjpMessage.class);
/**
* The string manager for this package.
/**
* Logger.
*/
- protected static org.apache.commons.logging.Log log
- = org.apache.commons.logging.LogFactory.getLog(AjpProcessor.class);
+ protected static org.apache.juli.logging.Log log
+ = org.apache.juli.logging.LogFactory.getLog(AjpProcessor.class);
/**
* The string manager for this package.
implements ProtocolHandler, MBeanRegistration {
- protected static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(AjpProtocol.class);
+ protected static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog(AjpProtocol.class);
/**
* The string manager for this package.
/**
* Logger.
*/
- protected static org.apache.commons.logging.Log log
- = org.apache.commons.logging.LogFactory.getLog(Http11AprProcessor.class);
+ protected static org.apache.juli.logging.Log log
+ = org.apache.juli.logging.LogFactory.getLog(Http11AprProcessor.class);
/**
* The string manager for this package.
}
}
- protected static org.apache.commons.logging.Log log
- = org.apache.commons.logging.LogFactory.getLog(Http11AprProtocol.class);
+ protected static org.apache.juli.logging.Log log
+ = org.apache.juli.logging.LogFactory.getLog(Http11AprProtocol.class);
// -------------------- Various implementation classes --------------------
/**
* Logger.
*/
- protected static org.apache.commons.logging.Log log
- = org.apache.commons.logging.LogFactory.getLog(Http11NioProcessor.class);
+ protected static org.apache.juli.logging.Log log
+ = org.apache.juli.logging.LogFactory.getLog(Http11NioProcessor.class);
/**
* The string manager for this package.
}
}
- protected static org.apache.commons.logging.Log log
- = org.apache.commons.logging.LogFactory.getLog(Http11NioProtocol.class);
+ protected static org.apache.juli.logging.Log log
+ = org.apache.juli.logging.LogFactory.getLog(Http11NioProtocol.class);
// -------------------- Various implementation classes --------------------
/**
* Logger.
*/
- protected static org.apache.commons.logging.Log log
- = org.apache.commons.logging.LogFactory.getLog(Http11Processor.class);
+ protected static org.apache.juli.logging.Log log
+ = org.apache.juli.logging.LogFactory.getLog(Http11Processor.class);
/**
* The string manager for this package.
int threadRatio = (endpoint.getCurrentThreadsBusy() * 100)
/ endpoint.getMaxThreads();
- if ((threadRatio > 33) && (threadRatio <= 66)) {
- soTimeout = soTimeout / 2;
- } else if ((threadRatio > 66) && (threadRatio <= 90)) {
- soTimeout = soTimeout / 3;
- keepAliveLeft = 1;
- } else if (threadRatio > 90) {
- soTimeout = soTimeout / 20;
+ if (threadRatio > 75) {
keepAliveLeft = 1;
}
implements ProtocolHandler, MBeanRegistration {
- protected static org.apache.commons.logging.Log log
- = org.apache.commons.logging.LogFactory.getLog(Http11Protocol.class);
+ protected static org.apache.juli.logging.Log log
+ = org.apache.juli.logging.LogFactory.getLog(Http11Protocol.class);
/**
* The string manager for this package.
import org.apache.jasper.compiler.TagPluginManager;
import org.apache.jasper.compiler.Localizer;
import org.apache.jasper.xmlparser.ParserUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
* A class to hold all init parameters specific to the JSP engine.
import java.util.StringTokenizer;
import java.util.Vector;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.jasper.compiler.Compiler;
import org.apache.jasper.compiler.JspConfig;
import org.apache.jasper.compiler.JspRuntimeContext;
import org.apache.jasper.compiler.TagPluginManager;
import org.apache.jasper.compiler.TldLocationsCache;
import org.apache.jasper.servlet.JspCServletContext;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tools.ant.AntClassLoader;
import org.apache.tools.ant.Project;
*/
public class JspCompilationContext {
- protected org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(JspCompilationContext.class);
+ protected org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog(JspCompilationContext.class);
protected Map<String, URL> tagFileJarUrls;
protected boolean isPackagedTagFile;
*/
public abstract class Compiler {
- protected org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
+ protected org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory
.getLog(Compiler.class);
// ----------------------------------------------------- Instance Variables
import javax.servlet.ServletContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.jasper.JasperException;
import org.apache.jasper.xmlparser.ParserUtils;
import org.apache.jasper.xmlparser.TreeNode;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.xml.sax.InputSource;
/**
import java.net.URL;
import java.net.MalformedURLException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.jasper.JasperException;
import org.apache.jasper.JspCompilationContext;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
* JspReader is an input buffer for the JSP parser. It should allow
import javax.servlet.ServletContext;
import javax.servlet.jsp.JspFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.jasper.Constants;
import org.apache.jasper.JspCompilationContext;
import org.apache.jasper.Options;
import org.apache.jasper.runtime.JspFactoryImpl;
import org.apache.jasper.security.SecurityClassLoad;
import org.apache.jasper.servlet.JspServletWrapper;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
* Class for tracking JSP compile time file dependencies when the
*/
public class SmapUtil {
- private org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( SmapUtil.class );
+ private org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( SmapUtil.class );
//*********************************************************************
// Constants
// Installation logic (from Robert Field, JSR-045 spec lead)
private static class SDEInstaller {
- private org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( SDEInstaller.class );
+ private org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( SDEInstaller.class );
static final String nameSDE = "SourceDebugExtension";
import javax.servlet.jsp.tagext.ValidationMessage;
import javax.servlet.jsp.tagext.VariableInfo;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.jasper.JasperException;
import org.apache.jasper.JspCompilationContext;
import org.apache.jasper.xmlparser.ParserUtils;
import org.apache.jasper.xmlparser.TreeNode;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
* Implementation of the TagLibraryInfo class from the JSP spec.
import javax.servlet.ServletContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.jasper.Constants;
import org.apache.jasper.JasperException;
import org.apache.jasper.xmlparser.ParserUtils;
import org.apache.jasper.xmlparser.TreeNode;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
* A container for all tag libraries that are defined "globally"
factory.getClass().getClassLoader().loadClass( basePackage +
"servlet.JspServletWrapper");
} catch (ClassNotFoundException ex) {
- org.apache.commons.logging.LogFactory.getLog( HttpJspBase.class )
+ org.apache.juli.logging.LogFactory.getLog( HttpJspBase.class )
.error("Jasper JspRuntimeContext preload of class failed: " +
ex.getMessage(), ex);
}
import javax.servlet.jsp.PageContext;
import org.apache.jasper.util.SimplePool;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
* Implementation of JspFactory.
import javax.servlet.jsp.el.VariableResolver;
import javax.servlet.jsp.tagext.BodyContent;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.jasper.Constants;
import org.apache.jasper.compiler.Localizer;
import org.apache.jasper.el.ELContextImpl;
import org.apache.jasper.el.VariableResolverImpl;
import org.apache.jasper.security.SecurityUtil;
import org.apache.jasper.util.Enumerator;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
* Implementation of the PageContext class from the JSP spec. Also doubles as a
import javax.servlet.jsp.tagext.Tag;
import org.apache.AnnotationProcessor;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.jasper.Constants;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
* Pool of tag handlers that can be reused.
public final class SecurityClassLoad {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( SecurityClassLoad.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( SecurityClassLoad.class );
public static void securityClassLoad(ClassLoader loader){
import javax.servlet.http.HttpServletResponse;
import org.apache.PeriodicEventListener;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.jasper.Constants;
import org.apache.jasper.EmbeddedServletOptions;
import org.apache.jasper.Options;
import org.apache.jasper.compiler.JspRuntimeContext;
import org.apache.jasper.compiler.Localizer;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
* The JSP engine (a.k.a Jasper).
import javax.servlet.jsp.tagext.TagInfo;
import org.apache.AnnotationProcessor;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.jasper.JasperException;
import org.apache.jasper.JspCompilationContext;
import org.apache.jasper.Options;
import org.apache.jasper.compiler.JspRuntimeContext;
import org.apache.jasper.compiler.Localizer;
import org.apache.jasper.runtime.JspSourceDependent;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/**
* The JSP engine (a.k.a Jasper).
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.jasper.Constants;
import org.apache.jasper.JasperException;
import org.apache.jasper.compiler.Localizer;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.w3c.dom.Comment;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
*/
public class UCSReader extends Reader {
- private org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( UCSReader.class );
+ private org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( UCSReader.class );
//
// Constants
public class UTF8Reader
extends Reader {
- private org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( UTF8Reader.class );
+ private org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( UTF8Reader.class );
//
// Constants
log.debug( "Error loading native library ", ex);
}
}
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( AprImpl.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( AprImpl.class );
}
return 0;
}
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( ChannelJni.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( ChannelJni.class );
}
*/
public class ChannelNioSocket extends JkHandler
implements NotificationBroadcaster, JkChannel {
- private static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog( ChannelNioSocket.class );
+ private static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog( ChannelNioSocket.class );
private int startPort=8009;
private int maxPort=8019; // 0 for backward compat.
*/
public class ChannelSocket extends JkHandler
implements NotificationBroadcaster, JkChannel {
- private static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog( ChannelSocket.class );
+ private static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog( ChannelSocket.class );
private int startPort=8009;
private int maxPort=8019; // 0 for backward compat.
return ("jk-" + encodedAddr);
}
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( ChannelUn.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( ChannelUn.class );
}
class AprAcceptor implements ThreadPoolRunnable {
*/
public class HandlerDispatch extends JkHandler
{
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( HandlerDispatch.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( HandlerDispatch.class );
public HandlerDispatch()
{
*/
public class HandlerRequest extends JkHandler
{
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( HandlerRequest.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( HandlerRequest.class );
/*
* Note for Host parsing.
/** Generic input stream impl on top of ajp
*/
public class JkInputStream implements InputBuffer, OutputBuffer {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( JkInputStream.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( JkInputStream.class );
private Msg bodyMsg = new MsgAjp();
private Msg outputMsg = new MsgAjp();
return objN;
}
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( JkMX.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( JkMX.class );
}
return status;
}
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( JniHandler.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( JniHandler.class );
}
* @author Costin Manolache
*/
public class MsgAjp extends Msg {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( MsgAjp.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( MsgAjp.class );
// that's the original buffer size in ajp13 - otherwise we'll get interoperability problems.
private byte buf[]=new byte[8*1024];
return 0;
}
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( Shm.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( Shm.class );
//-------------------- Main - use the shm functions from ant or CLI ------
// Not ready yet.
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( Shm14.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( Shm14.class );
MappedByteBuffer bb;
*/
public class ApacheConfig extends BaseJkConfig {
- private static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(ApacheConfig.class);
+ private static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog(ApacheConfig.class);
/** default path to mod_jk .conf location */
public static final String MOD_JK_CONFIG = "conf/auto/mod_jk.conf";
@version $Revision: 299988 $
*/
public class BaseJkConfig implements LifecycleListener {
- private static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(BaseJkConfig.class);
+ private static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog(BaseJkConfig.class);
protected File configHome = null;
protected File workersConfig = null;
@author Bill Barker
*/
public class IISConfig extends BaseJkConfig {
- private static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(IISConfig.class);
+ private static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog(IISConfig.class);
public static final String WORKERS_CONFIG = "/conf/jk/workers.properties";
public static final String URI_WORKERS_MAP_CONFIG = "/conf/auto/uriworkermap.properties";
@author Bill Barker
*/
public class NSConfig extends BaseJkConfig {
- private static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(NSConfig.class);
+ private static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog(NSConfig.class);
public static final String WORKERS_CONFIG = "/conf/jk/workers.properties";
public static final String NS_CONFIG = "/conf/auto/obj.conf";
}
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( WebXml2Jk.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( WebXml2Jk.class );
// -------------------- DOM utils --------------------
* @author Costin Manolache
*/
public class MsgContext implements ActionHook {
- private static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(MsgContext.class);
- private static org.apache.commons.logging.Log logTime=
- org.apache.commons.logging.LogFactory.getLog( "org.apache.jk.REQ_TIME" );
+ private static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog(MsgContext.class);
+ private static org.apache.juli.logging.Log logTime=
+ org.apache.juli.logging.LogFactory.getLog( "org.apache.jk.REQ_TIME" );
private int type;
private Object notes[]=new Object[32];
* jmx:notification-handler name="org.apache.coyote.ACTION_COMMIT
*/
public class JkCoyoteHandler extends JkHandler implements ProtocolHandler {
- protected static org.apache.commons.logging.Log log
- = org.apache.commons.logging.LogFactory.getLog(JkCoyoteHandler.class);
+ protected static org.apache.juli.logging.Log log
+ = org.apache.juli.logging.LogFactory.getLog(JkCoyoteHandler.class);
// Set debug on this logger to see the container request time
// ----------------------------------------------------------- DoPrivileged
}
}
- static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( JkMain.class );
+ static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( JkMain.class );
protected String domain;
protected ObjectName oname;
--- /dev/null
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2004 Costin Manolache
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.juli.logging;
+
+import java.util.logging.ConsoleHandler;
+import java.util.logging.Formatter;
+import java.util.logging.Handler;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+
+/**
+ * Hardcoded java.util.logging commons-logging implementation.
+ *
+ * In addition, it curr
+ *
+ */
+class DirectJDKLog implements Log {
+ // no reason to hide this - but good reasons to not hide
+ public Logger logger;
+
+ /** Alternate config reader and console format
+ */
+ private static final String SIMPLE_FMT="org.apache.tomcat.util.log.JdkLoggerFormatter";
+ private static final String SIMPLE_CFG="org.apache.tomcat.util.log.JdkLoggerConfig";
+
+ static {
+ if( System.getProperty("java.util.logging.config.class") ==null &&
+ System.getProperty("java.util.logging.config.file") ==null ) {
+ // default configuration - it sucks. Let's override at least the
+ // formatter for the console
+ try {
+ Class.forName(SIMPLE_CFG).newInstance();
+ } catch( Throwable t ) {
+ }
+ try {
+ Formatter fmt=(Formatter)Class.forName(SIMPLE_FMT).newInstance();
+ // it is also possible that the user modifed jre/lib/logging.properties -
+ // but that's really stupid in most cases
+ Logger root=Logger.getLogger("");
+ Handler handlers[]=root.getHandlers();
+ for( int i=0; i< handlers.length; i++ ) {
+ // I only care about console - that's what's used in default config anyway
+ if( handlers[i] instanceof ConsoleHandler ) {
+ handlers[i].setFormatter(fmt);
+ }
+ }
+ } catch( Throwable t ) {
+ // maybe it wasn't included - the ugly default will be used.
+ }
+
+ }
+ }
+
+ public DirectJDKLog(String name ) {
+ logger=Logger.getLogger(name);
+ }
+
+ public final boolean isErrorEnabled() {
+ return logger.isLoggable(Level.SEVERE);
+ }
+
+ public final boolean isWarnEnabled() {
+ return logger.isLoggable(Level.WARNING);
+ }
+
+ public final boolean isInfoEnabled() {
+ return logger.isLoggable(Level.INFO);
+ }
+
+ public final boolean isDebugEnabled() {
+ return logger.isLoggable(Level.FINE);
+ }
+
+ public final boolean isFatalEnabled() {
+ return logger.isLoggable(Level.SEVERE);
+ }
+
+ public final boolean isTraceEnabled() {
+ return logger.isLoggable(Level.FINER);
+ }
+
+ public final void debug(Object message) {
+ log(Level.FINE, String.valueOf(message), null);
+ }
+
+ public final void debug(Object message, Throwable t) {
+ log(Level.FINE, String.valueOf(message), t);
+ }
+
+ public final void trace(Object message) {
+ log(Level.FINER, String.valueOf(message), null);
+ }
+
+ public final void trace(Object message, Throwable t) {
+ log(Level.FINER, String.valueOf(message), t);
+ }
+
+ public final void info(Object message) {
+ log(Level.INFO, String.valueOf(message), null);
+ }
+
+ public final void info(Object message, Throwable t) {
+ log(Level.INFO, String.valueOf(message), t);
+ }
+
+ public final void warn(Object message) {
+ log(Level.WARNING, String.valueOf(message), null);
+ }
+
+ public final void warn(Object message, Throwable t) {
+ log(Level.WARNING, String.valueOf(message), t);
+ }
+
+ public final void error(Object message) {
+ log(Level.SEVERE, String.valueOf(message), null);
+ }
+
+ public final void error(Object message, Throwable t) {
+ log(Level.SEVERE, String.valueOf(message), t);
+ }
+
+ public final void fatal(Object message) {
+ log(Level.SEVERE, String.valueOf(message), null);
+ }
+
+ public final void fatal(Object message, Throwable t) {
+ log(Level.SEVERE, String.valueOf(message), t);
+ }
+
+ // from commons logging. This would be my number one reason why java.util.logging
+ // is bad - design by comitee can be really bad ! The impact on performance of
+ // using java.util.logging - and the ugliness if you need to wrap it - is far
+ // worse than the unfriendly and uncommon default format for logs.
+
+ private void log( Level level, String msg, Throwable ex ) {
+ if (logger.isLoggable(level)) {
+ // Hack (?) to get the stack trace.
+ Throwable dummyException=new Throwable();
+ StackTraceElement locations[]=dummyException.getStackTrace();
+ // Caller will be the third element
+ String cname="unknown";
+ String method="unknown";
+ if( locations!=null && locations.length >2 ) {
+ StackTraceElement caller=locations[2];
+ cname=caller.getClassName();
+ method=caller.getMethodName();
+ }
+ if( ex==null ) {
+ logger.logp( level, cname, method, msg );
+ } else {
+ logger.logp( level, cname, method, msg, ex );
+ }
+ }
+ }
+
+ // for LogFactory
+ static void release() {
+
+ }
+
+ static Log getInstance(String name) {
+ return new DirectJDKLog( name );
+ }
+}
+
+
--- /dev/null
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.juli.logging;
+
+/**
+ * <p>A simple logging interface abstracting logging APIs. In order to be
+ * instantiated successfully by {@link LogFactory}, classes that implement
+ * this interface must have a constructor that takes a single String
+ * parameter representing the "name" of this Log.</p>
+ *
+ * <p> The six logging levels used by <code>Log</code> are (in order):
+ * <ol>
+ * <li>trace (the least serious)</li>
+ * <li>debug</li>
+ * <li>info</li>
+ * <li>warn</li>
+ * <li>error</li>
+ * <li>fatal (the most serious)</li>
+ * </ol>
+ * The mapping of these log levels to the concepts used by the underlying
+ * logging system is implementation dependent.
+ * The implemention should ensure, though, that this ordering behaves
+ * as expected.</p>
+ *
+ * <p>Performance is often a logging concern.
+ * By examining the appropriate property,
+ * a component can avoid expensive operations (producing information
+ * to be logged).</p>
+ *
+ * <p> For example,
+ * <code><pre>
+ * if (log.isDebugEnabled()) {
+ * ... do something expensive ...
+ * log.debug(theResult);
+ * }
+ * </pre></code>
+ * </p>
+ *
+ * <p>Configuration of the underlying logging system will generally be done
+ * external to the Logging APIs, through whatever mechanism is supported by
+ * that system.</p>
+ *
+ * @author <a href="mailto:sanders@apache.org">Scott Sanders</a>
+ * @author Rod Waldhoff
+ * @version $Id: Log.java 155426 2005-02-26 13:10:49Z dirkv $
+ */
+public interface Log {
+
+
+ // ----------------------------------------------------- Logging Properties
+
+
+ /**
+ * <p> Is debug logging currently enabled? </p>
+ *
+ * <p> Call this method to prevent having to perform expensive operations
+ * (for example, <code>String</code> concatenation)
+ * when the log level is more than debug. </p>
+ */
+ public boolean isDebugEnabled();
+
+
+ /**
+ * <p> Is error logging currently enabled? </p>
+ *
+ * <p> Call this method to prevent having to perform expensive operations
+ * (for example, <code>String</code> concatenation)
+ * when the log level is more than error. </p>
+ */
+ public boolean isErrorEnabled();
+
+
+ /**
+ * <p> Is fatal logging currently enabled? </p>
+ *
+ * <p> Call this method to prevent having to perform expensive operations
+ * (for example, <code>String</code> concatenation)
+ * when the log level is more than fatal. </p>
+ */
+ public boolean isFatalEnabled();
+
+
+ /**
+ * <p> Is info logging currently enabled? </p>
+ *
+ * <p> Call this method to prevent having to perform expensive operations
+ * (for example, <code>String</code> concatenation)
+ * when the log level is more than info. </p>
+ */
+ public boolean isInfoEnabled();
+
+
+ /**
+ * <p> Is trace logging currently enabled? </p>
+ *
+ * <p> Call this method to prevent having to perform expensive operations
+ * (for example, <code>String</code> concatenation)
+ * when the log level is more than trace. </p>
+ */
+ public boolean isTraceEnabled();
+
+
+ /**
+ * <p> Is warn logging currently enabled? </p>
+ *
+ * <p> Call this method to prevent having to perform expensive operations
+ * (for example, <code>String</code> concatenation)
+ * when the log level is more than warn. </p>
+ */
+ public boolean isWarnEnabled();
+
+
+ // -------------------------------------------------------- Logging Methods
+
+
+ /**
+ * <p> Log a message with trace log level. </p>
+ *
+ * @param message log this message
+ */
+ public void trace(Object message);
+
+
+ /**
+ * <p> Log an error with trace log level. </p>
+ *
+ * @param message log this message
+ * @param t log this cause
+ */
+ public void trace(Object message, Throwable t);
+
+
+ /**
+ * <p> Log a message with debug log level. </p>
+ *
+ * @param message log this message
+ */
+ public void debug(Object message);
+
+
+ /**
+ * <p> Log an error with debug log level. </p>
+ *
+ * @param message log this message
+ * @param t log this cause
+ */
+ public void debug(Object message, Throwable t);
+
+
+ /**
+ * <p> Log a message with info log level. </p>
+ *
+ * @param message log this message
+ */
+ public void info(Object message);
+
+
+ /**
+ * <p> Log an error with info log level. </p>
+ *
+ * @param message log this message
+ * @param t log this cause
+ */
+ public void info(Object message, Throwable t);
+
+
+ /**
+ * <p> Log a message with warn log level. </p>
+ *
+ * @param message log this message
+ */
+ public void warn(Object message);
+
+
+ /**
+ * <p> Log an error with warn log level. </p>
+ *
+ * @param message log this message
+ * @param t log this cause
+ */
+ public void warn(Object message, Throwable t);
+
+
+ /**
+ * <p> Log a message with error log level. </p>
+ *
+ * @param message log this message
+ */
+ public void error(Object message);
+
+
+ /**
+ * <p> Log an error with error log level. </p>
+ *
+ * @param message log this message
+ * @param t log this cause
+ */
+ public void error(Object message, Throwable t);
+
+
+ /**
+ * <p> Log a message with fatal log level. </p>
+ *
+ * @param message log this message
+ */
+ public void fatal(Object message);
+
+
+ /**
+ * <p> Log an error with fatal log level. </p>
+ *
+ * @param message log this message
+ * @param t log this cause
+ */
+ public void fatal(Object message, Throwable t);
+
+
+}
--- /dev/null
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.juli.logging;
+
+
+/**
+ * <p>An exception that is thrown only if a suitable <code>LogFactory</code>
+ * or <code>Log</code> instance cannot be created by the corresponding
+ * factory methods.</p>
+ *
+ * @author Craig R. McClanahan
+ * @version $Revision: 155426 $ $Date: 2005-02-26 05:10:49 -0800 (Sat, 26 Feb 2005) $
+ */
+
+public class LogConfigurationException extends RuntimeException {
+
+
+ /**
+ * Construct a new exception with <code>null</code> as its detail message.
+ */
+ public LogConfigurationException() {
+ super();
+ }
+
+
+ /**
+ * Construct a new exception with the specified detail message.
+ *
+ * @param message The detail message
+ */
+ public LogConfigurationException(String message) {
+ super(message);
+ }
+
+
+ /**
+ * Construct a new exception with the specified cause and a derived
+ * detail message.
+ *
+ * @param cause The underlying cause
+ */
+ public LogConfigurationException(Throwable cause) {
+ this( ((cause == null) ? null : cause.toString()), cause);
+ }
+
+
+ /**
+ * Construct a new exception with the specified detail message and cause.
+ *
+ * @param message The detail message
+ * @param cause The underlying cause
+ */
+ public LogConfigurationException(String message, Throwable cause) {
+
+ super(message);
+ this.cause = cause; // Two-argument version requires JDK 1.4 or later
+
+ }
+
+
+ /**
+ * The underlying cause of this exception.
+ */
+ protected Throwable cause = null;
+
+
+ /**
+ * Return the underlying cause of this exception (if any).
+ */
+ public Throwable getCause() {
+
+ return (this.cause);
+
+ }
+
+
+}
--- /dev/null
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.juli.logging;
+
+
+import java.util.Properties;
+
+
+
+/**
+ * Modified LogFactory: removed all discovery, hardcode a specific implementation
+ * If you like a different logging implementation - use either the discovery-based
+ * commons-logging, or better - another implementation hardcoded to your favourite
+ * logging impl.
+ *
+ * Why ? Each application and deployment can choose a logging implementation -
+ * that involves configuration, installing the logger jar and optional plugins, etc.
+ * As part of this process - they can as well install the commons-logging implementation
+ * that corresponds to their logger of choice. This completely avoids any discovery
+ * problem, while still allowing the user to switch.
+ *
+ * Note that this implementation is not just a wrapper arround JDK logging ( like
+ * the original commons-logging impl ). It adds 2 features - a simpler configuration
+ * ( which is in fact a subset of log4j.properties ) and a formatter that is
+ * less ugly.
+ *
+ * The removal of 'abstract' preserves binary backward compatibility. It is possible
+ * to preserve the abstract - and introduce another ( hardcoded ) factory - but I
+ * see no benefit.
+ *
+ * Since this class is not intended to be extended - and provides
+ * no plugin for other LogFactory implementation - all protected methods are removed.
+ * This can be changed - but again, there is little value in keeping dead code.
+ * Just take a quick look at the removed code ( and it's complexity)
+ *
+ * --------------
+ *
+ * Original comment:
+ * <p>Factory for creating {@link Log} instances, with discovery and
+ * configuration features similar to that employed by standard Java APIs
+ * such as JAXP.</p>
+ *
+ * <p><strong>IMPLEMENTATION NOTE</strong> - This implementation is heavily
+ * based on the SAXParserFactory and DocumentBuilderFactory implementations
+ * (corresponding to the JAXP pluggability APIs) found in Apache Xerces.</p>
+ *
+ *
+ * @author Craig R. McClanahan
+ * @author Costin Manolache
+ * @author Richard A. Sitze
+ * @version $Revision: 209449 $ $Date: 2005-07-06 05:06:32 -0700 (Wed, 06 Jul 2005) $
+ */
+public /* abstract */ class LogFactory {
+
+ // ----------------------------------------------------- Manifest Constants
+
+ /**
+ * The name of the property used to identify the LogFactory implementation
+ * class name.
+ */
+ public static final String FACTORY_PROPERTY =
+ "org.apache.commons.logging.LogFactory";
+
+ /**
+ * The fully qualified class name of the fallback <code>LogFactory</code>
+ * implementation class to use, if no other can be found.
+ */
+ public static final String FACTORY_DEFAULT =
+ "org.apache.commons.logging.impl.LogFactoryImpl";
+
+ /**
+ * The name of the properties file to search for.
+ */
+ public static final String FACTORY_PROPERTIES =
+ "commons-logging.properties";
+
+ /**
+ * <p>Setting this system property value allows the <code>Hashtable</code> used to store
+ * classloaders to be substituted by an alternative implementation.
+ * </p>
+ * <p>
+ * <strong>Note:</strong> <code>LogFactory</code> will print:
+ * <code><pre>
+ * [ERROR] LogFactory: Load of custom hashtable failed</em>
+ * </code></pre>
+ * to system error and then continue using a standard Hashtable.
+ * </p>
+ * <p>
+ * <strong>Usage:</strong> Set this property when Java is invoked
+ * and <code>LogFactory</code> will attempt to load a new instance
+ * of the given implementation class.
+ * For example, running the following ant scriplet:
+ * <code><pre>
+ * <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
+ * ...
+ * <sysproperty
+ * key="org.apache.commons.logging.LogFactory.HashtableImpl"
+ * value="org.apache.commons.logging.AltHashtable"/>
+ * </java>
+ * </pre></code>
+ * will mean that <code>LogFactory</code> will load an instance of
+ * <code>org.apache.commons.logging.AltHashtable</code>.
+ * </p>
+ * <p>
+ * A typical use case is to allow a custom
+ * Hashtable implementation using weak references to be substituted.
+ * This will allow classloaders to be garbage collected without
+ * the need to release them (on 1.3+ JVMs only, of course ;)
+ * </p>
+ */
+ public static final String HASHTABLE_IMPLEMENTATION_PROPERTY =
+ "org.apache.commons.logging.LogFactory.HashtableImpl";
+
+ private static LogFactory singleton=new LogFactory();
+
+ Properties logConfig;
+
+ // ----------------------------------------------------------- Constructors
+
+
+ /**
+ * Protected constructor that is not available for public use.
+ */
+ private LogFactory() {
+ logConfig=new Properties();
+ }
+
+ // hook for syserr logger - class level
+ void setLogConfig( Properties p ) {
+ this.logConfig=p;
+ }
+ // --------------------------------------------------------- Public Methods
+
+ // only those 2 methods need to change to use a different direct logger.
+
+ /**
+ * <p>Construct (if necessary) and return a <code>Log</code> instance,
+ * using the factory's current set of configuration attributes.</p>
+ *
+ * <p><strong>NOTE</strong> - Depending upon the implementation of
+ * the <code>LogFactory</code> you are using, the <code>Log</code>
+ * instance you are returned may or may not be local to the current
+ * application, and may or may not be returned again on a subsequent
+ * call with the same name argument.</p>
+ *
+ * @param name Logical name of the <code>Log</code> instance to be
+ * returned (the meaning of this name is only known to the underlying
+ * logging implementation that is being wrapped)
+ *
+ * @exception LogConfigurationException if a suitable <code>Log</code>
+ * instance cannot be returned
+ */
+ public Log getInstance(String name)
+ throws LogConfigurationException {
+ return DirectJDKLog.getInstance(name);
+ }
+
+
+ /**
+ * Release any internal references to previously created {@link Log}
+ * instances returned by this factory. This is useful in environments
+ * like servlet containers, which implement application reloading by
+ * throwing away a ClassLoader. Dangling references to objects in that
+ * class loader would prevent garbage collection.
+ */
+ public void release() {
+ DirectJDKLog.release();
+ }
+
+ /**
+ * Return the configuration attribute with the specified name (if any),
+ * or <code>null</code> if there is no such attribute.
+ *
+ * @param name Name of the attribute to return
+ */
+ public Object getAttribute(String name) {
+ return logConfig.get(name);
+ }
+
+
+ /**
+ * Return an array containing the names of all currently defined
+ * configuration attributes. If there are no such attributes, a zero
+ * length array is returned.
+ */
+ public String[] getAttributeNames() {
+ return (String[])logConfig.keySet().toArray();
+ }
+
+ /**
+ * Remove any configuration attribute associated with the specified name.
+ * If there is no such attribute, no action is taken.
+ *
+ * @param name Name of the attribute to remove
+ */
+ public void removeAttribute(String name) {
+ logConfig.remove(name);
+ }
+
+
+ /**
+ * Set the configuration attribute with the specified name. Calling
+ * this with a <code>null</code> value is equivalent to calling
+ * <code>removeAttribute(name)</code>.
+ *
+ * @param name Name of the attribute to set
+ * @param value Value of the attribute to set, or <code>null</code>
+ * to remove any setting for this attribute
+ */
+ public void setAttribute(String name, Object value) {
+ logConfig.put(name, value);
+ }
+
+
+ /**
+ * Convenience method to derive a name from the specified class and
+ * call <code>getInstance(String)</code> with it.
+ *
+ * @param clazz Class for which a suitable Log name will be derived
+ *
+ * @exception LogConfigurationException if a suitable <code>Log</code>
+ * instance cannot be returned
+ */
+ public Log getInstance(Class clazz)
+ throws LogConfigurationException {
+ return getInstance( clazz.getName());
+ }
+
+
+
+
+
+ // ------------------------------------------------------- Static Variables
+
+
+
+ // --------------------------------------------------------- Static Methods
+
+
+ /**
+ * <p>Construct (if necessary) and return a <code>LogFactory</code>
+ * instance, using the following ordered lookup procedure to determine
+ * the name of the implementation class to be loaded.</p>
+ * <ul>
+ * <li>The <code>org.apache.commons.logging.LogFactory</code> system
+ * property.</li>
+ * <li>The JDK 1.3 Service Discovery mechanism</li>
+ * <li>Use the properties file <code>commons-logging.properties</code>
+ * file, if found in the class path of this class. The configuration
+ * file is in standard <code>java.util.Properties</code> format and
+ * contains the fully qualified name of the implementation class
+ * with the key being the system property defined above.</li>
+ * <li>Fall back to a default implementation class
+ * (<code>org.apache.commons.logging.impl.LogFactoryImpl</code>).</li>
+ * </ul>
+ *
+ * <p><em>NOTE</em> - If the properties file method of identifying the
+ * <code>LogFactory</code> implementation class is utilized, all of the
+ * properties defined in this file will be set as configuration attributes
+ * on the corresponding <code>LogFactory</code> instance.</p>
+ *
+ * @exception LogConfigurationException if the implementation class is not
+ * available or cannot be instantiated.
+ */
+ public static LogFactory getFactory() throws LogConfigurationException {
+ return singleton;
+ }
+
+
+ /**
+ * Convenience method to return a named logger, without the application
+ * having to care about factories.
+ *
+ * @param clazz Class from which a log name will be derived
+ *
+ * @exception LogConfigurationException if a suitable <code>Log</code>
+ * instance cannot be returned
+ */
+ public static Log getLog(Class clazz)
+ throws LogConfigurationException {
+ return (getFactory().getInstance(clazz));
+
+ }
+
+
+ /**
+ * Convenience method to return a named logger, without the application
+ * having to care about factories.
+ *
+ * @param name Logical name of the <code>Log</code> instance to be
+ * returned (the meaning of this name is only known to the underlying
+ * logging implementation that is being wrapped)
+ *
+ * @exception LogConfigurationException if a suitable <code>Log</code>
+ * instance cannot be returned
+ */
+ public static Log getLog(String name)
+ throws LogConfigurationException {
+ return (getFactory().getInstance(name));
+
+ }
+
+
+ /**
+ * Release any internal references to previously created {@link LogFactory}
+ * instances that have been associated with the specified class loader
+ * (if any), after calling the instance method <code>release()</code> on
+ * each of them.
+ *
+ * @param classLoader ClassLoader for which to release the LogFactory
+ */
+ public static void release(ClassLoader classLoader) {
+ // nothing - we don't use any class loaders
+ }
+
+
+ /**
+ * Release any internal references to previously created {@link LogFactory}
+ * instances, after calling the instance method <code>release()</code> on
+ * each of them. This is useful in environments like servlet containers,
+ * which implement application reloading by throwing away a ClassLoader.
+ * Dangling references to objects in that class loader would prevent
+ * garbage collection.
+ */
+ public static void releaseAll() {
+ singleton.release();
+ }
+
+ /**
+ * Returns a string that uniquely identifies the specified object, including
+ * its class.
+ * <p>
+ * The returned string is of form "classname@hashcode", ie is the same as
+ * the return value of the Object.toString() method, but works even when
+ * the specified object's class has overidden the toString method.
+ *
+ * @param o may be null.
+ * @return a string of form classname@hashcode, or "null" if param o is null.
+ */
+ public static String objectId(Object o) {
+ if (o == null) {
+ return "null";
+ } else {
+ return o.getClass().getName() + "@" + System.identityHashCode(o);
+ }
+ }
+}
--- /dev/null
+<body>
+
+<h3>Overview</h3>
+
+
+<p>This implementation of commons-logging uses a commons-logging.jar
+ specific to a particular logging framework, instead of discovery. This takes
+out the guessing, is simpler, faster and more robust. Just like you chose a
+logging implementation, you should also use a matching commons-logging - for
+example you download log4j.jar and commons-logging-log4j.jar, or use jdk
+logging and use commons-logging-jdk.jar.</p>
+
+<p>A similar packaging is used by Eclipse SWT - they provide a common widget API,
+ but each platform uses a different implementation jar - instead of using a complex
+ discovery/plugin mechanism.
+</p>
+
+<p>This package generates commons-logging-jdk14.jar - i.e. the java.util implementation
+of commons-logging api.<p>
+
+</body>
protected static final NameParser nameParser = new NameParserImpl();
- private static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(NamingContext.class);
+ private static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog(NamingContext.class);
// ----------------------------------------------------------- Constructors
public class FileDirContext extends BaseDirContext {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( FileDirContext.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( FileDirContext.class );
// -------------------------------------------------------------- Constants
public class WARDirContext extends BaseDirContext {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( WARDirContext.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( WARDirContext.class );
// ----------------------------------------------------------- Constructors
* @author Costin Manolache
*/
public class DomUtil {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( DomUtil.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( DomUtil.class );
// -------------------- DOM utils --------------------
public final class IntrospectionUtils {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( IntrospectionUtils.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( IntrospectionUtils.class );
/**
* Call execute() - any ant-like task should work
public class B2CConverter {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( B2CConverter.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( B2CConverter.class );
private IntermediateInputStream iis;
private ReadConvertor conv;
public final class Base64 {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( Base64.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( Base64.class );
static private final int BASELENGTH = 255;
static private final int LOOKUPLENGTH = 63;
*/
public final class C2BConverter {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog(C2BConverter.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog(C2BConverter.class );
private IntermediateOutputStream ios;
private WriteConvertor conv;
public class StringCache {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( StringCache.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( StringCache.class );
// ------------------------------------------------------- Static Variables
*/
public final class UDecoder {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog(UDecoder.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog(UDecoder.class );
public UDecoder()
{
*/
public final class UEncoder {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog(UEncoder.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog(UEncoder.class );
// Not static - the set may differ ( it's better than adding
// an extra check for "/", "+", etc
public final class UTF8Decoder extends B2CConverter {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog(UTF8Decoder.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog(UTF8Decoder.class );
// may have state !!
public final class SimpleHashtable implements Enumeration
{
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog( SimpleHashtable.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog( SimpleHashtable.class );
// entries ...
private Entry table[];
public final class SimplePool {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog(SimplePool.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog(SimplePool.class );
/*
* Where the threads are held.
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.IntrospectionUtils;
import org.xml.sax.Attributes;
import org.xml.sax.EntityResolver;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.xml.sax.SAXException;
import org.xml.sax.SAXNotRecognizedException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.xml.sax.SAXException;
import org.xml.sax.SAXNotRecognizedException;
import org.xml.sax.SAXNotSupportedException;
*/
public final class Cookies { // extends MultiMap {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog(Cookies.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog(Cookies.class );
// expected average number of cookies per request
public static final int INITIAL_SIZE=4;
public final class Parameters extends MultiMap {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog(Parameters.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog(Parameters.class );
// Transition: we'll use the same Hashtable( String->String[] )
// for the beginning. When we are sure all accesses happen through
public class ServerCookie implements Serializable {
- private static org.apache.commons.logging.Log log=
- org.apache.commons.logging.LogFactory.getLog(ServerCookie.class );
+ private static org.apache.juli.logging.Log log=
+ org.apache.juli.logging.LogFactory.getLog(ServerCookie.class );
private MessageBytes name=MessageBytes.newInstance();
private MessageBytes value=MessageBytes.newInstance();
public final class Mapper {
- private static org.apache.commons.logging.Log logger =
- org.apache.commons.logging.LogFactory.getLog(Mapper.class);
+ private static org.apache.juli.logging.Log logger =
+ org.apache.juli.logging.LogFactory.getLog(Mapper.class);
// ----------------------------------------------------- Instance Variables
import javax.management.modelmbean.InvalidTargetObjectTypeException;
import javax.management.modelmbean.ModelMBeanNotificationBroadcaster;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
/*
* Changes from commons.modeler:
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.modules.ModelerSource;
/*
import java.util.ArrayList;
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.DomUtil;
import org.apache.tomcat.util.modeler.AttributeInfo;
import org.apache.tomcat.util.modeler.ManagedBean;
import org.apache.tomcat.util.digester.Digester;
import org.apache.tomcat.util.modeler.Registry;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
public class MbeansDescriptorsDigesterSource extends ModelerSource
{
import javax.management.ObjectName;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.AttributeInfo;
import org.apache.tomcat.util.modeler.ManagedBean;
import org.apache.tomcat.util.modeler.OperationInfo;
import java.util.ArrayList;
import java.util.List;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.ManagedBean;
import org.apache.tomcat.util.modeler.Registry;
import javax.management.loading.MLet;
import javax.xml.transform.TransformerException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.DomUtil;
import org.apache.tomcat.util.modeler.AttributeInfo;
import org.apache.tomcat.util.modeler.BaseModelMBean;
import java.util.HashMap;
import java.util.concurrent.Executor;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.jni.Address;
import org.apache.tomcat.jni.Error;
import org.apache.tomcat.jni.File;
import java.net.InetAddress;
import java.util.concurrent.Executor;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
/**
import java.net.Socket;
import java.util.concurrent.Executor;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
/**
import javax.net.ssl.SSLEngine;
import javax.net.ssl.TrustManagerFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.net.SecureNioChannel.ApplicationBufferHandler;
import org.apache.tomcat.util.res.StringManager;
import java.util.Stack;
import java.util.Vector;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
import org.apache.tomcat.util.threads.ThreadPool;
import org.apache.tomcat.util.threads.ThreadPoolRunnable;
@author EKR
*/
abstract public class SSLImplementation {
- private static org.apache.commons.logging.Log logger =
- org.apache.commons.logging.LogFactory.getLog(SSLImplementation.class);
+ private static org.apache.juli.logging.Log logger =
+ org.apache.juli.logging.LogFactory.getLog(SSLImplementation.class);
// The default implementations in our search path
private static final String PureTLSImplementationClass=
{
static final String SSLSocketClass = "javax.net.ssl.SSLSocket";
- static org.apache.commons.logging.Log logger =
- org.apache.commons.logging.LogFactory.getLog(JSSEImplementation.class);
+ static org.apache.juli.logging.Log logger =
+ org.apache.juli.logging.LogFactory.getLog(JSSEImplementation.class);
private JSSEFactory factory = null;
private static final String defaultKeystoreFile
= System.getProperty("user.home") + "/.keystore";
private static final String defaultKeyPass = "changeit";
- static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(JSSESocketFactory.class);
+ static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog(JSSESocketFactory.class);
protected boolean initialized;
protected String clientAuth = "false";
class JSSESupport implements SSLSupport {
- private static org.apache.commons.logging.Log log =
- org.apache.commons.logging.LogFactory.getLog(JSSESupport.class);
+ private static org.apache.juli.logging.Log log =
+ org.apache.juli.logging.LogFactory.getLog(JSSESupport.class);
protected SSLSocket ssl;
protected SSLSession session;
package org.apache.tomcat.util.threads;
import java.util.*;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
/**