[jbossweb-commits] JBossWeb SVN: r230 - in branches/2.0.x/src/share/classes/org: apache/catalina/authenticator and 37 other directories.

jbossweb-commits at lists.jboss.org jbossweb-commits at lists.jboss.org
Mon Aug 20 19:47:38 EDT 2007


Author: remy.maucherat at jboss.com
Date: 2007-08-20 19:47:37 -0400 (Mon, 20 Aug 2007)
New Revision: 230

Added:
   branches/2.0.x/src/share/classes/org/jboss/logging/
   branches/2.0.x/src/share/classes/org/jboss/logging/DynamicLogger.java
   branches/2.0.x/src/share/classes/org/jboss/logging/Logger.java
   branches/2.0.x/src/share/classes/org/jboss/logging/LoggerPlugin.java
   branches/2.0.x/src/share/classes/org/jboss/logging/MDC.java
   branches/2.0.x/src/share/classes/org/jboss/logging/MDCProvider.java
   branches/2.0.x/src/share/classes/org/jboss/logging/MDCSupport.java
   branches/2.0.x/src/share/classes/org/jboss/logging/NDC.java
   branches/2.0.x/src/share/classes/org/jboss/logging/NDCProvider.java
   branches/2.0.x/src/share/classes/org/jboss/logging/NDCSupport.java
   branches/2.0.x/src/share/classes/org/jboss/logging/NullLoggerPlugin.java
   branches/2.0.x/src/share/classes/org/jboss/logging/NullMDCProvider.java
   branches/2.0.x/src/share/classes/org/jboss/logging/NullNDCProvider.java
   branches/2.0.x/src/share/classes/org/jboss/logging/jdk/
   branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDK14LoggerPlugin.java
   branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDKMDCProvider.java
   branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDKNDCProvider.java
Modified:
   branches/2.0.x/src/share/classes/org/apache/catalina/Container.java
   branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/AuthenticatorBase.java
   branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/BasicAuthenticator.java
   branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/DigestAuthenticator.java
   branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/FormAuthenticator.java
   branches/2.0.x/src/share/classes/org/apache/catalina/connector/CoyoteAdapter.java
   branches/2.0.x/src/share/classes/org/apache/catalina/connector/MapperListener.java
   branches/2.0.x/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java
   branches/2.0.x/src/share/classes/org/apache/catalina/core/ContainerBase.java
   branches/2.0.x/src/share/classes/org/apache/catalina/core/JasperListener.java
   branches/2.0.x/src/share/classes/org/apache/catalina/core/NamingContextListener.java
   branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardContext.java
   branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardEngine.java
   branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardHost.java
   branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardHostValve.java
   branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardPipeline.java
   branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardServer.java
   branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardService.java
   branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardWrapper.java
   branches/2.0.x/src/share/classes/org/apache/catalina/deploy/SecurityCollection.java
   branches/2.0.x/src/share/classes/org/apache/catalina/loader/WebappClassLoader.java
   branches/2.0.x/src/share/classes/org/apache/catalina/loader/WebappLoader.java
   branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java
   branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/MBeanFactory.java
   branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/MBeanUtils.java
   branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/ServerLifecycleListener.java
   branches/2.0.x/src/share/classes/org/apache/catalina/realm/JAASMemoryLoginModule.java
   branches/2.0.x/src/share/classes/org/apache/catalina/realm/JAASRealm.java
   branches/2.0.x/src/share/classes/org/apache/catalina/realm/MemoryRealm.java
   branches/2.0.x/src/share/classes/org/apache/catalina/realm/RealmBase.java
   branches/2.0.x/src/share/classes/org/apache/catalina/security/SecurityConfig.java
   branches/2.0.x/src/share/classes/org/apache/catalina/security/SecurityUtil.java
   branches/2.0.x/src/share/classes/org/apache/catalina/session/ManagerBase.java
   branches/2.0.x/src/share/classes/org/apache/catalina/session/PersistentManagerBase.java
   branches/2.0.x/src/share/classes/org/apache/catalina/startup/Bootstrap.java
   branches/2.0.x/src/share/classes/org/apache/catalina/startup/CatalinaProperties.java
   branches/2.0.x/src/share/classes/org/apache/catalina/startup/ClassLoaderFactory.java
   branches/2.0.x/src/share/classes/org/apache/catalina/startup/ClusterRuleSetFactory.java
   branches/2.0.x/src/share/classes/org/apache/catalina/startup/ContextConfig.java
   branches/2.0.x/src/share/classes/org/apache/catalina/startup/DigesterFactory.java
   branches/2.0.x/src/share/classes/org/apache/catalina/startup/EngineConfig.java
   branches/2.0.x/src/share/classes/org/apache/catalina/startup/ExpandWar.java
   branches/2.0.x/src/share/classes/org/apache/catalina/startup/HostConfig.java
   branches/2.0.x/src/share/classes/org/apache/catalina/startup/TldConfig.java
   branches/2.0.x/src/share/classes/org/apache/catalina/startup/Tool.java
   branches/2.0.x/src/share/classes/org/apache/catalina/startup/UserConfig.java
   branches/2.0.x/src/share/classes/org/apache/catalina/users/MemoryUserDatabase.java
   branches/2.0.x/src/share/classes/org/apache/catalina/util/ExtensionValidator.java
   branches/2.0.x/src/share/classes/org/apache/catalina/util/StringManager.java
   branches/2.0.x/src/share/classes/org/apache/catalina/valves/AccessLogValve.java
   branches/2.0.x/src/share/classes/org/apache/catalina/valves/ExtendedAccessLogValve.java
   branches/2.0.x/src/share/classes/org/apache/catalina/valves/RequestDumperValve.java
   branches/2.0.x/src/share/classes/org/apache/catalina/valves/ValveBase.java
   branches/2.0.x/src/share/classes/org/apache/coyote/ajp/AjpAprProcessor.java
   branches/2.0.x/src/share/classes/org/apache/coyote/ajp/AjpMessage.java
   branches/2.0.x/src/share/classes/org/apache/coyote/ajp/AjpProcessor.java
   branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11AprProcessor.java
   branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11NioProcessor.java
   branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11NioProtocol.java
   branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11Processor.java
   branches/2.0.x/src/share/classes/org/apache/jasper/EmbeddedServletOptions.java
   branches/2.0.x/src/share/classes/org/apache/jasper/JspC.java
   branches/2.0.x/src/share/classes/org/apache/jasper/JspCompilationContext.java
   branches/2.0.x/src/share/classes/org/apache/jasper/compiler/Compiler.java
   branches/2.0.x/src/share/classes/org/apache/jasper/compiler/JspConfig.java
   branches/2.0.x/src/share/classes/org/apache/jasper/compiler/JspReader.java
   branches/2.0.x/src/share/classes/org/apache/jasper/compiler/JspRuntimeContext.java
   branches/2.0.x/src/share/classes/org/apache/jasper/compiler/SmapUtil.java
   branches/2.0.x/src/share/classes/org/apache/jasper/compiler/TagLibraryInfoImpl.java
   branches/2.0.x/src/share/classes/org/apache/jasper/compiler/TldLocationsCache.java
   branches/2.0.x/src/share/classes/org/apache/jasper/runtime/JspFactoryImpl.java
   branches/2.0.x/src/share/classes/org/apache/jasper/runtime/TagHandlerPool.java
   branches/2.0.x/src/share/classes/org/apache/jasper/security/SecurityClassLoad.java
   branches/2.0.x/src/share/classes/org/apache/jasper/servlet/JspServlet.java
   branches/2.0.x/src/share/classes/org/apache/jasper/servlet/JspServletWrapper.java
   branches/2.0.x/src/share/classes/org/apache/jasper/xmlparser/ParserUtils.java
   branches/2.0.x/src/share/classes/org/apache/jasper/xmlparser/UCSReader.java
   branches/2.0.x/src/share/classes/org/apache/jasper/xmlparser/UTF8Reader.java
   branches/2.0.x/src/share/classes/org/apache/naming/NamingContext.java
   branches/2.0.x/src/share/classes/org/apache/naming/resources/FileDirContext.java
   branches/2.0.x/src/share/classes/org/apache/naming/resources/WARDirContext.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/DomUtil.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/B2CConverter.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/Base64.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/C2BConverter.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/StringCache.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/UDecoder.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/UEncoder.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/UTF8Decoder.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/collections/SimpleHashtable.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/collections/SimplePool.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/digester/GenericParser.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/digester/XercesParser.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/Cookies.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/Parameters.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/ServerCookie.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/mapper/Mapper.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/BaseModelMBean.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/Registry.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansSource.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/AprEndpoint.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/BaseEndpoint.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/JIoEndpoint.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/NioEndpoint.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/NioSelectorPool.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/PoolTcpEndpoint.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/SSLImplementation.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/jsse/JSSESupport.java
   branches/2.0.x/src/share/classes/org/apache/tomcat/util/threads/ThreadPool.java
   branches/2.0.x/src/share/classes/org/jboss/web/php/LifecycleListener.java
   branches/2.0.x/src/share/classes/org/jboss/web/php/ScriptEnvironment.java
Log:
- Switch to JBoss logging.
- The JBoss Logging classes could be replaced with a JBoss Logging JAR in that branch (it does not need any custom
  runtime behavior since there's no standalone build).
- Needs testing.

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/Container.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/Container.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/Container.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -26,7 +26,7 @@
 
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
-import org.apache.commons.logging.Log;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -161,7 +161,7 @@
      * no associated Logger, return the Logger associated with our parent
      * Container (if any); otherwise return <code>null</code>.
      */
-    public Log getLogger();
+    public Logger getLogger();
 
 
     /**

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/AuthenticatorBase.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/AuthenticatorBase.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/AuthenticatorBase.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -49,8 +49,7 @@
 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.jboss.logging.Logger;
 
 
 /**
@@ -77,7 +76,7 @@
 public abstract class AuthenticatorBase
     extends ValveBase
     implements Authenticator, Lifecycle {
-    private static Log log = LogFactory.getLog(AuthenticatorBase.class);
+    private static Logger log = Logger.getLogger(AuthenticatorBase.class);
 
 
     // ----------------------------------------------------- Instance Variables

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/BasicAuthenticator.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/BasicAuthenticator.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/BasicAuthenticator.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -28,11 +28,10 @@
 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.tomcat.util.buf.ByteChunk;
 import org.apache.tomcat.util.buf.CharChunk;
 import org.apache.tomcat.util.buf.MessageBytes;
+import org.jboss.logging.Logger;
 
 
 
@@ -47,7 +46,7 @@
 
 public class BasicAuthenticator
     extends AuthenticatorBase {
-    private static Log log = LogFactory.getLog(BasicAuthenticator.class);
+    private static Logger log = Logger.getLogger(BasicAuthenticator.class);
 
 
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/DigestAuthenticator.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/DigestAuthenticator.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/DigestAuthenticator.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -33,8 +33,7 @@
 import org.apache.catalina.connector.Response;
 import org.apache.catalina.deploy.LoginConfig;
 import org.apache.catalina.util.MD5Encoder;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.logging.Logger;
 
 
 
@@ -49,7 +48,7 @@
 
 public class DigestAuthenticator
     extends AuthenticatorBase {
-    private static Log log = LogFactory.getLog(DigestAuthenticator.class);
+    private static Logger log = Logger.getLogger(DigestAuthenticator.class);
 
 
     // -------------------------------------------------------------- Constants

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/FormAuthenticator.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/FormAuthenticator.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/authenticator/FormAuthenticator.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -35,13 +35,12 @@
 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.tomcat.util.buf.ByteChunk;
 import org.apache.tomcat.util.buf.CharChunk;
 import org.apache.tomcat.util.buf.MessageBytes;
 import org.apache.tomcat.util.http.MimeHeaders;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -56,7 +55,7 @@
 public class FormAuthenticator
     extends AuthenticatorBase {
     
-    private static Log log = LogFactory.getLog(FormAuthenticator.class);
+    private static Logger log = Logger.getLogger(FormAuthenticator.class);
 
     // ----------------------------------------------------- Instance Variables
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/connector/CoyoteAdapter.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/connector/CoyoteAdapter.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/connector/CoyoteAdapter.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -25,8 +25,6 @@
 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.tomcat.util.buf.B2CConverter;
@@ -36,6 +34,7 @@
 import org.apache.tomcat.util.http.Cookies;
 import org.apache.tomcat.util.http.ServerCookie;
 import org.apache.tomcat.util.net.SocketStatus;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -50,7 +49,7 @@
 public class CoyoteAdapter
     implements Adapter 
  {
-    private static Log log = LogFactory.getLog(CoyoteAdapter.class);
+    private static Logger log = Logger.getLogger(CoyoteAdapter.class);
 
     // -------------------------------------------------------------- Constants
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/connector/MapperListener.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/connector/MapperListener.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/connector/MapperListener.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -26,14 +26,13 @@
 import javax.management.ObjectInstance;
 import javax.management.ObjectName;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 
 import org.apache.tomcat.util.http.mapper.Mapper;
 import org.apache.tomcat.util.modeler.Registry;
 
 import org.apache.tomcat.util.res.StringManager;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -45,7 +44,7 @@
 public class MapperListener
     implements NotificationListener 
  {
-    private static Log log = LogFactory.getLog(MapperListener.class);
+    private static Logger log = Logger.getLogger(MapperListener.class);
 
 
     // ----------------------------------------------------- Instance Variables
@@ -290,7 +289,7 @@
                 }
             }
             
-            if (!isRegisteredWithAlias && log.isWarnEnabled())
+            if (!isRegisteredWithAlias)
                 log.warn(sm.getString("mapperListener.unknownDefaultHost", defaultHost));
         }
         // This should probablt be called later 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -25,9 +25,8 @@
 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.tomcat.jni.Library;
+import org.jboss.logging.Logger;
 
 
 
@@ -44,7 +43,7 @@
 public class AprLifecycleListener
     implements LifecycleListener {
 
-    private static Log log = LogFactory.getLog(AprLifecycleListener.class);
+    private static Logger log = Logger.getLogger(AprLifecycleListener.class);
 
     /**
      * The string manager for this package.

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/core/ContainerBase.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/core/ContainerBase.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/core/ContainerBase.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -54,10 +54,9 @@
 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.naming.resources.ProxyDirContext;
 import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -123,8 +122,8 @@
 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.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( ContainerBase.class );
 
     /**
      * Perform addChild with the permissions of this class.
@@ -185,7 +184,7 @@
     /**
      * The Logger implementation with which this Container is associated.
      */
-    protected Log logger = null;
+    protected Logger logger = null;
 
 
     /**
@@ -380,11 +379,11 @@
      * no associated Logger, return the Logger associated with our parent
      * Container (if any); otherwise return <code>null</code>.
      */
-    public Log getLogger() {
+    public Logger getLogger() {
 
         if (logger != null)
             return (logger);
-        logger = LogFactory.getLog(logName());
+        logger = Logger.getLogger(logName());
         return (logger);
 
     }

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/core/JasperListener.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/core/JasperListener.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/core/JasperListener.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -22,8 +22,7 @@
 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.jboss.logging.Logger;
 
 
 /**
@@ -38,7 +37,7 @@
 public class JasperListener
     implements LifecycleListener {
 
-    private static Log log = LogFactory.getLog(JasperListener.class);
+    private static Logger log = Logger.getLogger(JasperListener.class);
 
     /**
      * The string manager for this package.

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/core/NamingContextListener.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/core/NamingContextListener.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/core/NamingContextListener.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -57,8 +57,6 @@
 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.naming.ContextAccessController;
 import org.apache.naming.ContextBindings;
 import org.apache.naming.EjbRef;
@@ -70,6 +68,7 @@
 import org.apache.naming.ServiceRef;
 import org.apache.naming.TransactionRef;
 import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -83,13 +82,13 @@
 public class NamingContextListener
     implements LifecycleListener, ContainerListener, PropertyChangeListener {
 
-    private static Log log = LogFactory.getLog(NamingContextListener.class);
+    private static Logger log = Logger.getLogger(NamingContextListener.class);
 
 
     // ----------------------------------------------------- Instance Variables
 
 
-    protected Log logger = log;
+    protected Logger logger = log;
     
     
     /**

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardContext.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardContext.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardContext.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -92,8 +92,6 @@
 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.naming.ContextBindings;
 import org.apache.naming.resources.BaseDirContext;
 import org.apache.naming.resources.DirContextURLStreamHandler;
@@ -101,6 +99,7 @@
 import org.apache.naming.resources.ProxyDirContext;
 import org.apache.naming.resources.WARDirContext;
 import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
 
 /**
  * Standard implementation of the <b>Context</b> interface.  Each
@@ -116,7 +115,7 @@
     extends ContainerBase
     implements Context, Serializable, NotificationEmitter
 {
-    private static transient Log log = LogFactory.getLog(StandardContext.class);
+    private static transient Logger log = Logger.getLogger(StandardContext.class);
 
 
     // ----------------------------------------------------------- Constructors

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardEngine.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardEngine.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardEngine.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -34,10 +34,9 @@
 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.tomcat.util.modeler.Registry;
 import org.apache.tomcat.util.modeler.modules.MbeansSource;
+import org.jboss.logging.Logger;
 
 /**
  * Standard implementation of the <b>Engine</b> interface.  Each
@@ -53,7 +52,7 @@
     extends ContainerBase
     implements Engine {
 
-    private static Log log = LogFactory.getLog(StandardEngine.class);
+    private static Logger log = Logger.getLogger(StandardEngine.class);
 
     // ----------------------------------------------------------- Constructors
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardHost.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardHost.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardHost.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -48,8 +48,8 @@
  {
     /* 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.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( StandardHost.class );
     
     // ----------------------------------------------------------- Constructors
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardHostValve.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardHostValve.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardHostValve.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -37,8 +37,7 @@
 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.jboss.logging.Logger;
 
 
 /**
@@ -57,7 +56,7 @@
     extends ValveBase {
 
 
-    private static Log log = LogFactory.getLog(StandardHostValve.class);
+    private static Logger log = Logger.getLogger(StandardHostValve.class);
 
     // ----------------------------------------------------- Instance Variables
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardPipeline.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardPipeline.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardPipeline.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -33,9 +33,8 @@
 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.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -55,7 +54,7 @@
     implements Pipeline, Contained, Lifecycle 
  {
 
-    private static Log log = LogFactory.getLog(StandardPipeline.class);
+    private static Logger log = Logger.getLogger(StandardPipeline.class);
 
     // ----------------------------------------------------------- Constructors
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardServer.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardServer.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardServer.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -44,10 +44,9 @@
 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.tomcat.util.buf.StringCache;
 import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
 
 
 
@@ -61,7 +60,7 @@
 public final class StandardServer
     implements Lifecycle, Server, MBeanRegistration 
  {
-    private static Log log = LogFactory.getLog(StandardServer.class);
+    private static Logger log = Logger.getLogger(StandardServer.class);
    
 
     // -------------------------------------------------------------- Constants

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardService.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardService.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardService.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -35,11 +35,10 @@
 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.tomcat.util.modeler.Registry;
 import java.util.ArrayList;
 import org.apache.catalina.Executor;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -53,7 +52,7 @@
 public class StandardService
         implements Lifecycle, Service, MBeanRegistration 
  {
-    private static Log log = LogFactory.getLog(StandardService.class);
+    private static Logger log = Logger.getLogger(StandardService.class);
    
 
     // ----------------------------------------------------- Instance Variables

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardWrapper.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardWrapper.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/core/StandardWrapper.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -77,8 +77,8 @@
     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.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( StandardWrapper.class );
 
     protected static final String[] DEFAULT_SERVLET_METHODS = new String[] {
                                                     "GET", "HEAD", "POST" };

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/deploy/SecurityCollection.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/deploy/SecurityCollection.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/deploy/SecurityCollection.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -20,8 +20,7 @@
 
 
 import org.apache.catalina.util.RequestUtil;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.logging.Logger;
 
 
 import java.io.Serializable;
@@ -44,7 +43,7 @@
 
 public class SecurityCollection implements Serializable {
 
-    private static Log log = LogFactory.getLog(SecurityCollection.class);
+    private static Logger log = Logger.getLogger(SecurityCollection.class);
 
 
     // ----------------------------------------------------------- Constructors

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/loader/WebappClassLoader.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/loader/WebappClassLoader.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/loader/WebappClassLoader.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -106,8 +106,8 @@
     implements Reloader, Lifecycle
  {
 
-    protected static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( WebappClassLoader.class );
+    protected static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( WebappClassLoader.class );
 
     public static final boolean ENABLE_CLEAR_REFERENCES = 
         Boolean.valueOf(System.getProperty("org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES", "true")).booleanValue();
@@ -1638,9 +1638,6 @@
          // Clear the IntrospectionUtils cache.
         IntrospectionUtils.clear();
         
-        // Clear the classloader reference in common-logging
-        org.apache.commons.logging.LogFactory.release(this);
-        
         // Clear the classloader reference in the VM's bean introspector
         java.beans.Introspector.flushCaches();
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/loader/WebappLoader.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/loader/WebappLoader.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/loader/WebappLoader.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -1191,8 +1191,8 @@
     }
 
 
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( WebappLoader.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( WebappLoader.class );
 
     private ObjectName oname;
     private MBeanServer mserver;

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/GlobalResourcesLifecycleListener.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -32,9 +32,8 @@
 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.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -49,7 +48,7 @@
 
 public class GlobalResourcesLifecycleListener
     implements LifecycleListener {
-    private static Log log = LogFactory.getLog(GlobalResourcesLifecycleListener.class);
+    private static Logger log = Logger.getLogger(GlobalResourcesLifecycleListener.class);
 
     // ----------------------------------------------------- Instance Variables
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/MBeanFactory.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/MBeanFactory.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/MBeanFactory.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -67,8 +67,8 @@
 
 public class MBeanFactory extends BaseModelMBean {
 
-    private static org.apache.commons.logging.Log log = 
-        org.apache.commons.logging.LogFactory.getLog(MBeanFactory.class);
+    private static org.jboss.logging.Logger log = 
+        org.jboss.logging.Logger.getLogger(MBeanFactory.class);
 
     /**
      * The <code>MBeanServer</code> for this application.

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/MBeanUtils.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/MBeanUtils.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/MBeanUtils.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -47,11 +47,10 @@
 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.tomcat.util.IntrospectionUtils;
 import org.apache.tomcat.util.modeler.ManagedBean;
 import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -63,7 +62,7 @@
  */
 
 public class MBeanUtils {
-    private static Log log = LogFactory.getLog(MBeanUtils.class);
+    private static Logger log = Logger.getLogger(MBeanUtils.class);
 
     // ------------------------------------------------------- Static Variables
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/ServerLifecycleListener.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/ServerLifecycleListener.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/mbeans/ServerLifecycleListener.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -48,8 +48,7 @@
 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.jboss.logging.Logger;
 
 
 /**
@@ -65,7 +64,7 @@
 public class ServerLifecycleListener
     implements ContainerListener, LifecycleListener, PropertyChangeListener {
 
-    private static Log log = LogFactory.getLog(ServerLifecycleListener.class);
+    private static Logger log = Logger.getLogger(ServerLifecycleListener.class);
 
 
     // ------------------------------------------------------------- Properties

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/realm/JAASMemoryLoginModule.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/realm/JAASMemoryLoginModule.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/realm/JAASMemoryLoginModule.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -42,9 +42,8 @@
 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.tomcat.util.digester.Digester;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -79,7 +78,7 @@
 public class JAASMemoryLoginModule extends MemoryRealm implements LoginModule, Realm {
     // We need to extend MemoryRealm to avoid class cast
 
-    private static Log log = LogFactory.getLog(JAASMemoryLoginModule.class);
+    private static Logger log = Logger.getLogger(JAASMemoryLoginModule.class);
 
     // ----------------------------------------------------- Instance Variables
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/realm/JAASRealm.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/realm/JAASRealm.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/realm/JAASRealm.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -34,8 +34,7 @@
 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.jboss.logging.Logger;
 
 
 /**
@@ -126,7 +125,7 @@
 public class JAASRealm
     extends RealmBase
  {
-    private static Log log = LogFactory.getLog(JAASRealm.class);
+    private static Logger log = Logger.getLogger(JAASRealm.class);
 
     // ----------------------------------------------------- Instance Variables
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/realm/MemoryRealm.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/realm/MemoryRealm.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/realm/MemoryRealm.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -26,9 +26,8 @@
 import java.util.Map;
 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.tomcat.util.digester.Digester;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -47,7 +46,7 @@
 
 public class MemoryRealm  extends RealmBase {
 
-    private static Log log = LogFactory.getLog(MemoryRealm.class);
+    private static Logger log = Logger.getLogger(MemoryRealm.class);
 
     // ----------------------------------------------------- Instance Variables
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/realm/RealmBase.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/realm/RealmBase.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/realm/RealmBase.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -51,9 +51,8 @@
 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.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
 
 /**
  * Simple implementation of <b>Realm</b> that reads an XML file to configure
@@ -67,7 +66,7 @@
 public abstract class RealmBase
     implements Lifecycle, Realm, MBeanRegistration {
 
-    private static Log log = LogFactory.getLog(RealmBase.class);
+    private static Logger log = Logger.getLogger(RealmBase.class);
 
     // ----------------------------------------------------- Instance Variables
 
@@ -81,7 +80,7 @@
     /**
      * Container log
      */
-    protected Log containerLog = null;
+    protected Logger containerLog = null;
 
 
     /**

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/security/SecurityConfig.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/security/SecurityConfig.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/security/SecurityConfig.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -28,8 +28,8 @@
 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.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( SecurityConfig.class );
 
     
     private final static String PACKAGE_ACCESS =  "sun.,"

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/security/SecurityUtil.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/security/SecurityUtil.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/security/SecurityUtil.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -64,8 +64,8 @@
      */
     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.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( SecurityUtil.class );
     
     private static String PACKAGE = "org.apache.catalina.security";
     

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/session/ManagerBase.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/session/ManagerBase.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/session/ManagerBase.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -50,9 +50,8 @@
 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.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -65,7 +64,7 @@
  */
 
 public abstract class ManagerBase implements Manager, MBeanRegistration {
-    protected Log log = LogFactory.getLog(ManagerBase.class);
+    protected Logger log = Logger.getLogger(ManagerBase.class);
 
     // ----------------------------------------------------- Instance Variables
 
@@ -701,7 +700,7 @@
         if( initialized ) return;
         initialized=true;        
         
-        log = LogFactory.getLog(ManagerBase.class);
+        log = Logger.getLogger(ManagerBase.class);
         
         if( oname==null ) {
             try {

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/session/PersistentManagerBase.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/session/PersistentManagerBase.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/session/PersistentManagerBase.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -34,8 +34,7 @@
 import org.apache.catalina.util.LifecycleSupport;
 
 import org.apache.catalina.security.SecurityUtil;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.logging.Logger;
 /**
  * Extends the <b>ManagerBase</b> class to implement most of the
  * functionality required by a Manager which supports any kind of
@@ -54,7 +53,7 @@
     extends ManagerBase
     implements Lifecycle, PropertyChangeListener {
 
-    private static Log log = LogFactory.getLog(PersistentManagerBase.class);
+    private static Logger log = Logger.getLogger(PersistentManagerBase.class);
 
     // ---------------------------------------------------- Security Classes
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/startup/Bootstrap.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/startup/Bootstrap.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/startup/Bootstrap.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -31,8 +31,7 @@
 import javax.management.ObjectName;
 
 import org.apache.catalina.security.SecurityClassLoad;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -51,7 +50,7 @@
 
 public final class Bootstrap {
 
-    private static Log log = LogFactory.getLog(Bootstrap.class);
+    private static Logger log = Logger.getLogger(Bootstrap.class);
     
     // -------------------------------------------------------------- Constants
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/startup/CatalinaProperties.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/startup/CatalinaProperties.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/startup/CatalinaProperties.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -38,8 +38,8 @@
 
     // ------------------------------------------------------- Static Variables
 
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( CatalinaProperties.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( CatalinaProperties.class );
 
     private static Properties properties = null;
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/startup/ClassLoaderFactory.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/startup/ClassLoaderFactory.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/startup/ClassLoaderFactory.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -24,8 +24,7 @@
 import java.util.ArrayList;
 
 import org.apache.catalina.loader.StandardClassLoader;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -50,7 +49,7 @@
 public final class ClassLoaderFactory {
 
 
-    private static Log log = LogFactory.getLog(ClassLoaderFactory.class);
+    private static Logger log = Logger.getLogger(ClassLoaderFactory.class);
 
     protected static final Integer IS_DIR = new Integer(0);
     protected static final Integer IS_JAR = new Integer(1);

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/startup/ClusterRuleSetFactory.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/startup/ClusterRuleSetFactory.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/startup/ClusterRuleSetFactory.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -23,14 +23,13 @@
 import org.apache.tomcat.util.digester.RuleSetBase;
 import java.lang.reflect.Constructor;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.logging.Logger;
 
 import java.lang.reflect.InvocationTargetException;
 
 public class ClusterRuleSetFactory {
     
-    public static Log log = LogFactory.getLog(ClusterRuleSetFactory.class);
+    public static Logger log = Logger.getLogger(ClusterRuleSetFactory.class);
     
     public static RuleSetBase getClusterRuleSet(String prefix) {
         

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/startup/ContextConfig.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/startup/ContextConfig.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/startup/ContextConfig.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -70,8 +70,8 @@
 public class ContextConfig
     implements LifecycleListener {
 
-    protected static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( ContextConfig.class );
+    protected static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( ContextConfig.class );
 
     // ----------------------------------------------------- Instance Variables
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/startup/DigesterFactory.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/startup/DigesterFactory.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/startup/DigesterFactory.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -33,8 +33,8 @@
     /**
      * The log.
      */
-   protected static org.apache.commons.logging.Log log = 
-       org.apache.commons.logging.LogFactory.getLog(DigesterFactory.class);
+   protected static org.jboss.logging.Logger log = 
+       org.jboss.logging.Logger.getLogger(DigesterFactory.class);
 
     /**
      * The XML entiry resolver used by the Digester.

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/startup/EngineConfig.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/startup/EngineConfig.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/startup/EngineConfig.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -38,8 +38,8 @@
     implements LifecycleListener {
 
 
-    protected static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( EngineConfig.class );
+    protected static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( EngineConfig.class );
 
     // ----------------------------------------------------- Instance Variables
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/startup/ExpandWar.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/startup/ExpandWar.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/startup/ExpandWar.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -33,8 +33,7 @@
 
 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.jboss.logging.Logger;
 
 /**
  * Expand out a WAR in a Host's appBase.
@@ -47,7 +46,7 @@
 
 public class ExpandWar {
 
-    private static Log log = LogFactory.getLog(ExpandWar.class);
+    private static Logger log = Logger.getLogger(ExpandWar.class);
 
     /**
      * The string resources for this package.

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/startup/HostConfig.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/startup/HostConfig.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/startup/HostConfig.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -57,8 +57,8 @@
 public class HostConfig
     implements LifecycleListener {
     
-    protected static org.apache.commons.logging.Log log=
-         org.apache.commons.logging.LogFactory.getLog( HostConfig.class );
+    protected static org.jboss.logging.Logger log=
+         org.jboss.logging.Logger.getLogger( HostConfig.class );
 
     // ----------------------------------------------------- Instance Variables
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/startup/TldConfig.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/startup/TldConfig.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/startup/TldConfig.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -66,8 +66,8 @@
     // Names of JARs that are known not to contain any TLDs
     private static HashSet<String> noTldJars;
 
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( TldConfig.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( TldConfig.class );
 
     /*
      * Initializes the set of JARs that are known not to contain any TLDs

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/startup/Tool.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/startup/Tool.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/startup/Tool.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -23,8 +23,7 @@
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -73,7 +72,7 @@
 public final class Tool {
 
 
-    private static Log log = LogFactory.getLog(Tool.class);
+    private static Logger log = Logger.getLogger(Tool.class);
     
     // ------------------------------------------------------- Static Variables
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/startup/UserConfig.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/startup/UserConfig.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/startup/UserConfig.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -45,8 +45,8 @@
     implements LifecycleListener {
 
 
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( UserConfig.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( UserConfig.class );
 
     
     // ----------------------------------------------------- Instance Variables

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/users/MemoryUserDatabase.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/users/MemoryUserDatabase.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/users/MemoryUserDatabase.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -32,10 +32,9 @@
 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.tomcat.util.digester.Digester;
 import org.apache.tomcat.util.digester.ObjectCreationFactory;
+import org.jboss.logging.Logger;
 import org.xml.sax.Attributes;
 
 
@@ -52,7 +51,7 @@
 public class MemoryUserDatabase implements UserDatabase {
 
 
-    private static Log log = LogFactory.getLog(MemoryUserDatabase.class);
+    private static Logger log = Logger.getLogger(MemoryUserDatabase.class);
 
     // ----------------------------------------------------------- Constructors
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/util/ExtensionValidator.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/util/ExtensionValidator.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/util/ExtensionValidator.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -52,8 +52,8 @@
  */
 public final class ExtensionValidator {
 
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog(ExtensionValidator.class);
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger(ExtensionValidator.class);
 
     /**
      * The string resources for this package.

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/util/StringManager.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/util/StringManager.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/util/StringManager.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -56,8 +56,8 @@
 
     private ResourceBundle bundle;
     
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( StringManager.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( StringManager.class );
     
     /**
      * Creates a new StringManager for a given package. This is a

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/valves/AccessLogValve.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/valves/AccessLogValve.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/valves/AccessLogValve.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -43,8 +43,7 @@
 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.jboss.logging.Logger;
 
 
 /**
@@ -118,7 +117,7 @@
     extends ValveBase
     implements Lifecycle {
 
-    private static Log log = LogFactory.getLog(AccessLogValve.class);
+    private static Logger log = Logger.getLogger(AccessLogValve.class);
 
     // ----------------------------------------------------- Instance Variables
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/valves/ExtendedAccessLogValve.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/valves/ExtendedAccessLogValve.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/valves/ExtendedAccessLogValve.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -36,8 +36,7 @@
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
 import org.apache.catalina.util.ServerInfo;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.logging.Logger;
 
 
 
@@ -129,7 +128,7 @@
     extends AccessLogValve
     implements Lifecycle {
 
-    private static Log log = LogFactory.getLog(ExtendedAccessLogValve.class);
+    private static Logger log = Logger.getLogger(ExtendedAccessLogValve.class);
 
     // ----------------------------------------------------- Instance Variables
 

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/valves/RequestDumperValve.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/valves/RequestDumperValve.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/valves/RequestDumperValve.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -28,7 +28,7 @@
 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.jboss.logging.Logger;
 
 
 /**
@@ -94,7 +94,7 @@
     public void invoke(Request request, Response response)
         throws IOException, ServletException {
 
-        Log log = container.getLogger();
+        Logger log = container.getLogger();
         
         // Log pre-service information
         log.info("REQUEST URI       =" + request.getRequestURI());

Modified: branches/2.0.x/src/share/classes/org/apache/catalina/valves/ValveBase.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/catalina/valves/ValveBase.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/catalina/valves/ValveBase.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -40,8 +40,7 @@
 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.jboss.logging.Logger;
 
 
 /**
@@ -57,7 +56,7 @@
 
 public abstract class ValveBase
     implements Contained, Valve, MBeanRegistration {
-    private static Log log = LogFactory.getLog(ValveBase.class);
+    private static Logger log = Logger.getLogger(ValveBase.class);
 
     //------------------------------------------------------ Instance Variables
 
@@ -71,7 +70,7 @@
     /**
      * Container log
      */
-    protected Log containerLog = null;
+    protected Logger containerLog = null;
 
 
     /**

Modified: branches/2.0.x/src/share/classes/org/apache/coyote/ajp/AjpAprProcessor.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/coyote/ajp/AjpAprProcessor.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/coyote/ajp/AjpAprProcessor.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -61,8 +61,8 @@
     /**
      * Logger.
      */
-    protected static org.apache.commons.logging.Log log =
-        org.apache.commons.logging.LogFactory.getLog(AjpAprProcessor.class);
+    protected static org.jboss.logging.Logger log =
+        org.jboss.logging.Logger.getLogger(AjpAprProcessor.class);
 
     /**
      * The string manager for this package.

Modified: branches/2.0.x/src/share/classes/org/apache/coyote/ajp/AjpMessage.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/coyote/ajp/AjpMessage.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/coyote/ajp/AjpMessage.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -38,8 +38,8 @@
 public class AjpMessage {
 
 
-    protected static org.apache.commons.logging.Log log =
-        org.apache.commons.logging.LogFactory.getLog(AjpMessage.class);
+    protected static org.jboss.logging.Logger log =
+        org.jboss.logging.Logger.getLogger(AjpMessage.class);
 
     /**
      * The string manager for this package.

Modified: branches/2.0.x/src/share/classes/org/apache/coyote/ajp/AjpProcessor.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/coyote/ajp/AjpProcessor.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/coyote/ajp/AjpProcessor.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -61,8 +61,8 @@
     /**
      * Logger.
      */
-    protected static org.apache.commons.logging.Log log
-        = org.apache.commons.logging.LogFactory.getLog(AjpProcessor.class);
+    protected static org.jboss.logging.Logger log
+        = org.jboss.logging.Logger.getLogger(AjpProcessor.class);
 
     /**
      * The string manager for this package.

Modified: branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11AprProcessor.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11AprProcessor.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11AprProcessor.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -69,8 +69,8 @@
     /**
      * Logger.
      */
-    protected static org.apache.commons.logging.Log log
-        = org.apache.commons.logging.LogFactory.getLog(Http11AprProcessor.class);
+    protected static org.jboss.logging.Logger log
+        = org.jboss.logging.Logger.getLogger(Http11AprProcessor.class);
 
     /**
      * The string manager for this package.

Modified: branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11NioProcessor.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11NioProcessor.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11NioProcessor.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -67,8 +67,8 @@
     /**
      * Logger.
      */
-    protected static org.apache.commons.logging.Log log
-        = org.apache.commons.logging.LogFactory.getLog(Http11NioProcessor.class);
+    protected static org.jboss.logging.Logger log
+        = org.jboss.logging.Logger.getLogger(Http11NioProcessor.class);
 
     /**
      * The string manager for this package.

Modified: branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11NioProtocol.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11NioProtocol.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11NioProtocol.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -794,8 +794,8 @@
     }
     
 
-    protected static org.apache.commons.logging.Log log
-        = org.apache.commons.logging.LogFactory.getLog(Http11NioProtocol.class);
+    protected static org.jboss.logging.Logger log
+        = org.jboss.logging.Logger.getLogger(Http11NioProtocol.class);
 
     // -------------------- Various implementation classes --------------------
 

Modified: branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11Processor.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11Processor.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/coyote/http11/Http11Processor.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -64,8 +64,8 @@
     /**
      * Logger.
      */
-    protected static org.apache.commons.logging.Log log
-        = org.apache.commons.logging.LogFactory.getLog(Http11Processor.class);
+    protected static org.jboss.logging.Logger log
+        = org.jboss.logging.Logger.getLogger(Http11Processor.class);
 
     /**
      * The string manager for this package.

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/EmbeddedServletOptions.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/EmbeddedServletOptions.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/EmbeddedServletOptions.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -23,13 +23,12 @@
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.jasper.compiler.TldLocationsCache;
 import org.apache.jasper.compiler.JspConfig;
 import org.apache.jasper.compiler.TagPluginManager;
 import org.apache.jasper.compiler.Localizer;
 import org.apache.jasper.xmlparser.ParserUtils;
+import org.jboss.logging.Logger;
 
 /**
  * A class to hold all init parameters specific to the JSP engine. 
@@ -41,7 +40,7 @@
 public final class EmbeddedServletOptions implements Options {
     
     // Logger
-    private Log log = LogFactory.getLog(EmbeddedServletOptions.class);
+    private Logger log = Logger.getLogger(EmbeddedServletOptions.class);
     
     private Properties settings = new Properties();
     
@@ -419,9 +418,7 @@
             } else if (keepgen.equalsIgnoreCase("false")) {
                 this.keepGenerated = false;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.keepgen"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.keepgen"));
             }
         }
         
@@ -433,23 +430,18 @@
             } else if (trimsp.equalsIgnoreCase("false")) {
                 trimSpaces = false;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.trimspaces"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.trimspaces"));
             }
         }
         
         this.isPoolingEnabled = true;
-        String poolingEnabledParam
-        = config.getInitParameter("enablePooling"); 
+        String poolingEnabledParam = config.getInitParameter("enablePooling"); 
         if (poolingEnabledParam != null
                 && !poolingEnabledParam.equalsIgnoreCase("true")) {
             if (poolingEnabledParam.equalsIgnoreCase("false")) {
                 this.isPoolingEnabled = false;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.enablePooling"));
-                }		       	   
+                log.warn(Localizer.getMessage("jsp.warning.enablePooling"));
             }
         }
         
@@ -460,9 +452,7 @@
             } else if (mapFile.equalsIgnoreCase("false")) {
                 this.mappedFile = false;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.mappedFile"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.mappedFile"));
             }
         }
         
@@ -473,9 +463,7 @@
             } else if (senderr.equalsIgnoreCase("false")) {
                 this.sendErrorToClient = false;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.sendErrToClient"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.sendErrToClient"));
             }
         }
         
@@ -486,9 +474,7 @@
             } else if (debugInfo.equalsIgnoreCase("false")) {
                 this.classDebugInfo  = false;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.classDebugInfo"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.classDebugInfo"));
             }
         }
         
@@ -497,9 +483,7 @@
             try {
                 this.checkInterval = Integer.parseInt(checkInterval);
             } catch(NumberFormatException ex) {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.checkInterval"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.checkInterval"));
             }
         }
         
@@ -508,9 +492,7 @@
             try {
                 this.modificationTestInterval = Integer.parseInt(modificationTestInterval);
             } catch(NumberFormatException ex) {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.modificationTestInterval"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.modificationTestInterval"));
             }
         }
         
@@ -521,9 +503,7 @@
             } else if (development.equalsIgnoreCase("false")) {
                 this.development = false;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.development"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.development"));
             }
         }
         
@@ -534,9 +514,7 @@
             } else if (suppressSmap.equalsIgnoreCase("false")) {
                 isSmapSuppressed = false;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.suppressSmap"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.suppressSmap"));
             }
         }
         
@@ -547,9 +525,7 @@
             } else if (dumpSmap.equalsIgnoreCase("false")) {
                 isSmapDumped = false;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.dumpSmap"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.dumpSmap"));
             }
         }
         
@@ -560,9 +536,7 @@
             } else if (genCharArray.equalsIgnoreCase("false")) {
                 genStringAsCharArray = false;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.genchararray"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.genchararray"));
             }
         }
         
@@ -574,9 +548,7 @@
             } else if (errBeanClass.equalsIgnoreCase("false")) {
                 errorOnUseBeanInvalidClassAttribute = false;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.errBean"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.errBean"));
             }
         }
         
@@ -644,9 +616,7 @@
             } else if (fork.equalsIgnoreCase("false")) {
                 this.fork = false;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.fork"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.fork"));
             }
         }
         
@@ -657,9 +627,7 @@
             } else if (xpoweredBy.equalsIgnoreCase("false")) {
                 this.xpoweredBy = false;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.xpoweredBy"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.xpoweredBy"));
             }
         }
         
@@ -670,9 +638,7 @@
             } else if (displaySourceFragment.equalsIgnoreCase("false")) {
                 this.displaySourceFragment = false;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage("jsp.warning.displaySourceFragment"));
-                }
+                log.warn(Localizer.getMessage("jsp.warning.displaySourceFragment"));
             }
         }
         

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/JspC.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/JspC.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/JspC.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -40,8 +40,6 @@
 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;
@@ -53,6 +51,7 @@
 import org.apache.tools.ant.AntClassLoader;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.util.FileUtils;
+import org.jboss.logging.Logger;
 
 /**
  * Shell for the jspc compiler.  Handles all options associated with the
@@ -95,7 +94,7 @@
             "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93";
 
     // Logger
-    protected static Log log = LogFactory.getLog(JspC.class);
+    protected static Logger log = Logger.getLogger(JspC.class);
 
     protected static final String SWITCH_VERBOSE = "-v";
     protected static final String SWITCH_HELP = "-help";
@@ -1033,7 +1032,7 @@
             }
 
         } catch (Exception e) {
-            if ((e instanceof FileNotFoundException) && log.isWarnEnabled()) {
+            if (e instanceof FileNotFoundException) {
                 log.warn(Localizer.getMessage("jspc.error.fileDoesNotExist",
                                               e.getMessage()));
             }
@@ -1139,11 +1138,9 @@
                     fjsp = new File(uriRootF, nextjsp);
                 }
                 if (!fjsp.exists()) {
-                    if (log.isWarnEnabled()) {
-                        log.warn
+                    log.warn
                             (Localizer.getMessage
                              ("jspc.error.fileDoesNotExist", fjsp.toString()));
-                    }
                     continue;
                 }
                 String s = fjsp.getAbsolutePath();
@@ -1176,9 +1173,9 @@
             }
             throw je;
         } finally {
-            if (loader != null) {
-                LogFactory.release(loader);
-            }
+        	/*if (loader != null) {
+                Logger.release(loader);
+            }*/
         }
     }
 

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/JspCompilationContext.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/JspCompilationContext.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/JspCompilationContext.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -53,8 +53,8 @@
  */
 public class JspCompilationContext {
 
-    protected org.apache.commons.logging.Log log =
-        org.apache.commons.logging.LogFactory.getLog(JspCompilationContext.class);
+    protected org.jboss.logging.Logger log =
+        org.jboss.logging.Logger.getLogger(JspCompilationContext.class);
 
     protected Map<String, URL> tagFileJarUrls;
     protected boolean isPackagedTagFile;

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/compiler/Compiler.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/compiler/Compiler.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/compiler/Compiler.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -45,8 +45,8 @@
  */
 public abstract class Compiler {
     
-    protected org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
-            .getLog(Compiler.class);
+    protected org.jboss.logging.Logger log = org.jboss.logging.Logger
+            .getLogger(Compiler.class);
 
     // ----------------------------------------------------- Instance Variables
 

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/compiler/JspConfig.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/compiler/JspConfig.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/compiler/JspConfig.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -24,11 +24,10 @@
 
 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.jboss.logging.Logger;
 import org.xml.sax.InputSource;
 
 /**
@@ -44,7 +43,7 @@
     private static final String WEB_XML = "/WEB-INF/web.xml";
 
     // Logger
-    private Log log = LogFactory.getLog(JspConfig.class);
+    private Logger log = Logger.getLogger(JspConfig.class);
 
     private Vector jspProperties = null;
     private ServletContext ctxt;
@@ -180,11 +179,9 @@
                         boolean isStar = "*".equals(extension);
                         if ((path == null && (extension == null || isStar))
                                 || (path != null && !isStar)) {
-                            if (log.isWarnEnabled()) {
-                                log.warn(Localizer.getMessage(
+                            log.warn(Localizer.getMessage(
                                         "jsp.warning.bad.urlpattern.propertygroup",
                                         urlPattern));
-                            }
                             continue;
                         }
                     }

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/compiler/JspReader.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/compiler/JspReader.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/compiler/JspReader.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -27,10 +27,9 @@
 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.jboss.logging.Logger;
 
 /**
  * JspReader is an input buffer for the JSP parser. It should allow
@@ -53,7 +52,7 @@
     /**
      * Logger.
      */
-    private Log log = LogFactory.getLog(JspReader.class);
+    private Logger log = Logger.getLogger(JspReader.class);
 
     /**
      * The current spot in the file.

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/compiler/JspRuntimeContext.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/compiler/JspRuntimeContext.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/compiler/JspRuntimeContext.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -33,14 +33,13 @@
 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.jboss.logging.Logger;
 
 /**
  * Class for tracking JSP compile time file dependencies when the
@@ -58,7 +57,7 @@
 public final class JspRuntimeContext {
 
     // Logger
-    private Log log = LogFactory.getLog(JspRuntimeContext.class);
+    private Logger log = Logger.getLogger(JspRuntimeContext.class);
 
     /*
      * Counts how many times the webapp's JSPs have been reloaded.

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/compiler/SmapUtil.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/compiler/SmapUtil.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/compiler/SmapUtil.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -44,8 +44,8 @@
  */
 public class SmapUtil {
 
-    private org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( SmapUtil.class );
+    private org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( SmapUtil.class );
 
     //*********************************************************************
     // Constants
@@ -189,8 +189,8 @@
     // 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.jboss.logging.Logger log=
+            org.jboss.logging.Logger.getLogger( SDEInstaller.class );
 
         static final String nameSDE = "SourceDebugExtension";
 

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/compiler/TagLibraryInfoImpl.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/compiler/TagLibraryInfoImpl.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/compiler/TagLibraryInfoImpl.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -45,12 +45,11 @@
 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.jboss.logging.Logger;
 
 /**
  * Implementation of the TagLibraryInfo class from the JSP spec.
@@ -64,7 +63,7 @@
 class TagLibraryInfoImpl extends TagLibraryInfo implements TagConstants {
 
     // Logger
-    private Log log = LogFactory.getLog(TagLibraryInfoImpl.class);
+    private Logger log = Logger.getLogger(TagLibraryInfoImpl.class);
 
     private JspCompilationContext ctxt;
     
@@ -268,10 +267,8 @@
             } else if ("taglib-extension".equals(tname)) {
                 // Recognized but ignored
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage(
+                log.warn(Localizer.getMessage(
                             "jsp.warning.unknown.element.in.taglib", tname));
-                }
             }
 
         }
@@ -403,10 +400,8 @@
             } else if ("tag-extension".equals(tname)) {
                 // Ignored
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage(
+                log.warn(Localizer.getMessage(
                             "jsp.warning.unknown.element.in.tag", tname));
-                }
             }
         }
 
@@ -468,10 +463,8 @@
                     || "description".equals(tname)) {
                 // Ignore these elements: Bugzilla 38015
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage(
+                log.warn(Localizer.getMessage(
                             "jsp.warning.unknown.element.in.tagfile", tname));
-                }
             }
         }
 
@@ -555,10 +548,8 @@
             false) {
                 ;
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage(
+                log.warn(Localizer.getMessage(
                             "jsp.warning.unknown.element.in.attribute", tname));
-                }
             }
         }
 
@@ -621,10 +612,8 @@
             } else if ("description".equals(tname) || // Ignored elements
             false) {
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage(
+                log.warn(Localizer.getMessage(
                             "jsp.warning.unknown.element.in.variable", tname));
-                }
             }
         }
         return new TagVariableInfo(nameGiven, nameFromAttribute, className,
@@ -649,10 +638,8 @@
             } else if ("description".equals(tname) || // Ignored elements
             false) {
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage(
+                log.warn(Localizer.getMessage(
                             "jsp.warning.unknown.element.in.validator", tname));
-                }
             }
         }
 
@@ -687,10 +674,8 @@
             } else if ("description".equals(tname)) {
                 ; // Do nothing
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage(
+                log.warn(Localizer.getMessage(
                             "jsp.warning.unknown.element.in.initParam", tname));
-                }
             }
         }
         return initParam;
@@ -717,10 +702,8 @@
                     "small-icon".equals(tname) || "large-icon".equals(tname)
                     || "description".equals(tname) || "example".equals(tname)) {
             } else {
-                if (log.isWarnEnabled()) {
-                    log.warn(Localizer.getMessage(
+                log.warn(Localizer.getMessage(
                             "jsp.warning.unknown.element.in.function", tname));
-                }
             }
         }
 

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/compiler/TldLocationsCache.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/compiler/TldLocationsCache.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/compiler/TldLocationsCache.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -35,12 +35,11 @@
 
 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.jboss.logging.Logger;
 
 /**
  * A container for all tag libraries that are defined "globally"
@@ -78,7 +77,7 @@
 public class TldLocationsCache {
 
     // Logger
-    private Log log = LogFactory.getLog(TldLocationsCache.class);
+    private Logger log = Logger.getLogger(TldLocationsCache.class);
 
     /**
      * The types of URI one may specify for a tag library
@@ -266,15 +265,13 @@
                 try {
                     uri = new URL(FILE_PROTOCOL+altDDName.replace('\\', '/'));
                 } catch (MalformedURLException e) {
-                    if (log.isWarnEnabled()) {
-                        log.warn(Localizer.getMessage(
+                    log.warn(Localizer.getMessage(
                                             "jsp.error.internal.filenotfound",
                                             altDDName));
-                    }
                 }
             } else {
                 uri = ctxt.getResource(WEB_XML);
-                if (uri == null && log.isWarnEnabled()) {
+                if (uri == null) {
                     log.warn(Localizer.getMessage(
                                             "jsp.error.internal.filenotfound",
                                             WEB_XML));

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/runtime/JspFactoryImpl.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/runtime/JspFactoryImpl.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/runtime/JspFactoryImpl.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -29,8 +29,7 @@
 import javax.servlet.jsp.PageContext;
 
 import org.apache.jasper.Constants;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.logging.Logger;
 
 /**
  * Implementation of JspFactory.
@@ -40,7 +39,7 @@
 public class JspFactoryImpl extends JspFactory {
 
     // Logger
-    private Log log = LogFactory.getLog(JspFactoryImpl.class);
+    private Logger log = Logger.getLogger(JspFactoryImpl.class);
 
     private static final String SPEC_VERSION = "2.1";
     private static final boolean USE_POOL = 

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/runtime/TagHandlerPool.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/runtime/TagHandlerPool.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/runtime/TagHandlerPool.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -22,9 +22,8 @@
 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.jboss.logging.Logger;
 
 /**
  * Pool of tag handlers that can be reused.
@@ -38,7 +37,7 @@
     public static String OPTION_TAGPOOL="tagpoolClassName";
     public static String OPTION_MAXSIZE="tagpoolMaxSize";
 
-    private Log log = LogFactory.getLog(TagHandlerPool.class);
+    private Logger log = Logger.getLogger(TagHandlerPool.class);
     
     // index of next available tag handler
     private int current;

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/security/SecurityClassLoad.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/security/SecurityClassLoad.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/security/SecurityClassLoad.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -28,8 +28,8 @@
 
 public final class SecurityClassLoad {
 
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( SecurityClassLoad.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( SecurityClassLoad.class );
 
     public static void securityClassLoad(ClassLoader loader){
 

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/servlet/JspServlet.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/servlet/JspServlet.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/servlet/JspServlet.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -30,13 +30,12 @@
 
 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.jboss.logging.Logger;
 
 /**
  * The JSP engine (a.k.a Jasper).
@@ -57,7 +56,7 @@
 public class JspServlet extends HttpServlet implements PeriodicEventListener {
 
     // Logger
-    private Log log = LogFactory.getLog(JspServlet.class);
+    private Logger log = Logger.getLogger(JspServlet.class);
 
     private ServletContext context;
     private ServletConfig config;

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/servlet/JspServletWrapper.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/servlet/JspServletWrapper.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/servlet/JspServletWrapper.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -32,8 +32,6 @@
 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;
@@ -42,6 +40,7 @@
 import org.apache.jasper.compiler.JspRuntimeContext;
 import org.apache.jasper.compiler.Localizer;
 import org.apache.jasper.runtime.JspSourceDependent;
+import org.jboss.logging.Logger;
 
 /**
  * The JSP engine (a.k.a Jasper).
@@ -64,7 +63,7 @@
 public class JspServletWrapper {
 
     // Logger
-    private Log log = LogFactory.getLog(JspServletWrapper.class);
+    private Logger log = Logger.getLogger(JspServletWrapper.class);
 
     private Servlet theServlet;
     private String jspUri;

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/xmlparser/ParserUtils.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/xmlparser/ParserUtils.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/xmlparser/ParserUtils.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -24,11 +24,10 @@
 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.jboss.logging.Logger;
 import org.w3c.dom.Comment;
 import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
@@ -192,7 +191,7 @@
 class MyEntityResolver implements EntityResolver {
 
     // Logger
-    private Log log = LogFactory.getLog(MyEntityResolver.class);
+    private Logger log = Logger.getLogger(MyEntityResolver.class);
 
     public InputSource resolveEntity(String publicId, String systemId)
             throws SAXException {
@@ -221,7 +220,7 @@
 class MyErrorHandler implements ErrorHandler {
 
     // Logger
-    private Log log = LogFactory.getLog(MyErrorHandler.class);
+    private Logger log = Logger.getLogger(MyErrorHandler.class);
 
     public void warning(SAXParseException ex) throws SAXException {
         if (log.isDebugEnabled())

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/xmlparser/UCSReader.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/xmlparser/UCSReader.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/xmlparser/UCSReader.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -31,8 +31,8 @@
  */
 public class UCSReader extends Reader {
 
-    private org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( UCSReader.class );
+    private org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( UCSReader.class );
     
     //
     // Constants

Modified: branches/2.0.x/src/share/classes/org/apache/jasper/xmlparser/UTF8Reader.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/jasper/xmlparser/UTF8Reader.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/jasper/xmlparser/UTF8Reader.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -31,8 +31,8 @@
 public class UTF8Reader
     extends Reader {
 
-    private org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( UTF8Reader.class );
+    private org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( UTF8Reader.class );
     
     //
     // Constants

Modified: branches/2.0.x/src/share/classes/org/apache/naming/NamingContext.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/naming/NamingContext.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/naming/NamingContext.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -55,8 +55,8 @@
     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.jboss.logging.Logger log =
+        org.jboss.logging.Logger.getLogger(NamingContext.class);
 
 
     // ----------------------------------------------------------- Constructors

Modified: branches/2.0.x/src/share/classes/org/apache/naming/resources/FileDirContext.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/naming/resources/FileDirContext.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/naming/resources/FileDirContext.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -50,8 +50,8 @@
 
 public class FileDirContext extends BaseDirContext {
 
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( FileDirContext.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( FileDirContext.class );
 
     // -------------------------------------------------------------- Constants
 

Modified: branches/2.0.x/src/share/classes/org/apache/naming/resources/WARDirContext.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/naming/resources/WARDirContext.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/naming/resources/WARDirContext.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -53,8 +53,8 @@
 
 public class WARDirContext extends BaseDirContext {
 
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( WARDirContext.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( WARDirContext.class );
     
     // ----------------------------------------------------------- Constructors
 

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/DomUtil.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/DomUtil.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/DomUtil.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -45,8 +45,8 @@
  * @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.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( DomUtil.class );
 
     // -------------------- DOM utils --------------------
 

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/B2CConverter.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/B2CConverter.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/B2CConverter.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -37,8 +37,8 @@
 public class B2CConverter {
     
     
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( B2CConverter.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( B2CConverter.class );
     
     private IntermediateInputStream iis;
     private ReadConvertor conv;

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/Base64.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/Base64.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/Base64.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -34,8 +34,8 @@
 public final class Base64 {
 
 
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( Base64.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( Base64.class );
     
     static private final int  BASELENGTH         = 255;
     static private final int  LOOKUPLENGTH       = 63;

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/C2BConverter.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/C2BConverter.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/C2BConverter.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -31,8 +31,8 @@
  */
 public final class C2BConverter {
     
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog(C2BConverter.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger(C2BConverter.class );
     
     private IntermediateOutputStream ios;
     private WriteConvertor conv;

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/StringCache.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/StringCache.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/StringCache.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -30,8 +30,8 @@
 public class StringCache {
 
 
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog( StringCache.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( StringCache.class );
     
     
     // ------------------------------------------------------- Static Variables

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/UDecoder.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/UDecoder.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/UDecoder.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -30,8 +30,8 @@
  */
 public final class UDecoder {
     
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog(UDecoder.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger(UDecoder.class );
     
     protected static final boolean ALLOW_ENCODED_SLASH = 
         Boolean.valueOf(System.getProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH", "false")).booleanValue();

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/UEncoder.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/UEncoder.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/UEncoder.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -34,8 +34,8 @@
  */
 public final class UEncoder {
 
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog(UEncoder.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger(UEncoder.class );
     
     // Not static - the set may differ ( it's better than adding
     // an extra check for "/", "+", etc

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/UTF8Decoder.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/UTF8Decoder.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/buf/UTF8Decoder.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -34,8 +34,8 @@
 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.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger(UTF8Decoder.class );
     
     // may have state !!
     

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/collections/SimpleHashtable.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/collections/SimpleHashtable.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/collections/SimpleHashtable.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -59,8 +59,8 @@
 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.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger( SimpleHashtable.class );
     
     // entries ...
     private Entry		table[];

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/collections/SimplePool.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/collections/SimplePool.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/collections/SimplePool.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -28,8 +28,8 @@
 public final class SimplePool  {
     
     
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog(SimplePool.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger(SimplePool.class );
     
     /*
      * Where the threads are held.

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/digester/GenericParser.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/digester/GenericParser.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/digester/GenericParser.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -25,8 +25,7 @@
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.logging.Logger;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXNotRecognizedException;
 
@@ -41,8 +40,8 @@
     /**
      * The Log to which all SAX event related logging calls will be made.
      */
-    protected static Log log =
-        LogFactory.getLog("org.apache.commons.digester.Digester.sax");
+    protected static Logger log =
+        Logger.getLogger("org.apache.commons.digester.Digester.sax");
 
     /**
      * The JAXP 1.2 property required to set up the schema location.

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/digester/XercesParser.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/digester/XercesParser.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/digester/XercesParser.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -26,8 +26,7 @@
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.logging.Logger;
 import org.xml.sax.SAXException;
 import org.xml.sax.SAXNotRecognizedException;
 import org.xml.sax.SAXNotSupportedException;
@@ -46,8 +45,8 @@
     /**
      * The Log to which all SAX event related logging calls will be made.
      */
-    protected static Log log =
-        LogFactory.getLog("org.apache.commons.digester.Digester.sax");
+    protected static Logger log =
+        Logger.getLogger("org.apache.commons.digester.Digester.sax");
 
 
     /**

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/Cookies.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/Cookies.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/Cookies.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -35,8 +35,8 @@
  */
 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.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger(Cookies.class );
     
     // expected average number of cookies per request
     public static final int INITIAL_SIZE=4; 

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/Parameters.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/Parameters.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/Parameters.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -34,8 +34,8 @@
 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.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger(Parameters.class );
     
     // Transition: we'll use the same Hashtable( String->String[] )
     // for the beginning. When we are sure all accesses happen through

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/ServerCookie.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/ServerCookie.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/ServerCookie.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -37,8 +37,8 @@
 public class ServerCookie implements Serializable {
     
     
-    private static org.apache.commons.logging.Log log=
-        org.apache.commons.logging.LogFactory.getLog(ServerCookie.class );
+    private static org.jboss.logging.Logger log=
+        org.jboss.logging.Logger.getLogger(ServerCookie.class );
     
     private MessageBytes name=MessageBytes.newInstance();
     private MessageBytes value=MessageBytes.newInstance();

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/mapper/Mapper.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/mapper/Mapper.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/http/mapper/Mapper.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -35,8 +35,8 @@
 public final class Mapper {
 
 
-    private static org.apache.commons.logging.Log logger =
-        org.apache.commons.logging.LogFactory.getLog(Mapper.class);
+    private static org.jboss.logging.Logger logger =
+        org.jboss.logging.Logger.getLogger(Mapper.class);
     // ----------------------------------------------------- Instance Variables
 
 

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/BaseModelMBean.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/BaseModelMBean.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/BaseModelMBean.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -46,8 +46,7 @@
 import javax.management.modelmbean.InvalidTargetObjectTypeException;
 import javax.management.modelmbean.ModelMBeanNotificationBroadcaster;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.logging.Logger;
 
 /*
  * Changes from commons.modeler:
@@ -101,7 +100,7 @@
  * @author Costin Manolache
  */
 public class BaseModelMBean implements DynamicMBean, MBeanRegistration, ModelMBeanNotificationBroadcaster {
-    private static Log log = LogFactory.getLog(BaseModelMBean.class);
+    private static Logger log = Logger.getLogger(BaseModelMBean.class);
 
     // ----------------------------------------------------------- Constructors
 

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/Registry.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/Registry.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/Registry.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -39,9 +39,8 @@
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.tomcat.util.modeler.modules.ModelerSource;
+import org.jboss.logging.Logger;
 
 /*
    Issues:
@@ -75,7 +74,7 @@
     /**
      * The Log instance to which we will write our log messages.
      */
-    private static Log log = LogFactory.getLog(Registry.class);
+    private static Logger log = Logger.getLogger(Registry.class);
 
     // Support for the factory methods
     

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDOMSource.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -22,8 +22,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.tomcat.util.DomUtil;
 import org.apache.tomcat.util.modeler.AttributeInfo;
 import org.apache.tomcat.util.modeler.ManagedBean;
@@ -31,13 +29,14 @@
 import org.apache.tomcat.util.modeler.OperationInfo;
 import org.apache.tomcat.util.modeler.ParameterInfo;
 import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 
 
 public class MbeansDescriptorsDOMSource extends ModelerSource
 {
-    private static Log log = LogFactory.getLog(MbeansDescriptorsDOMSource.class);
+    private static Logger log = Logger.getLogger(MbeansDescriptorsDOMSource.class);
 
     Registry registry;
     String location;

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsDigesterSource.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -25,13 +25,12 @@
 
 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.jboss.logging.Logger;
 
 public class MbeansDescriptorsDigesterSource extends ModelerSource
 {
-    private static Log log =
-            LogFactory.getLog(MbeansDescriptorsDigesterSource.class);
+    private static Logger log =
+            Logger.getLogger(MbeansDescriptorsDigesterSource.class);
 
     Registry registry;
     String location;

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -28,17 +28,16 @@
 
 import javax.management.ObjectName;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.tomcat.util.modeler.AttributeInfo;
 import org.apache.tomcat.util.modeler.ManagedBean;
 import org.apache.tomcat.util.modeler.OperationInfo;
 import org.apache.tomcat.util.modeler.ParameterInfo;
 import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
 
 public class MbeansDescriptorsIntrospectionSource extends ModelerSource
 {
-    private static Log log = LogFactory.getLog(MbeansDescriptorsIntrospectionSource.class);
+    private static Logger log = Logger.getLogger(MbeansDescriptorsIntrospectionSource.class);
 
     Registry registry;
     String location;

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsSerSource.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -6,15 +6,14 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.tomcat.util.modeler.ManagedBean;
 import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
 
 
 public class MbeansDescriptorsSerSource extends ModelerSource
 {
-    private static Log log = LogFactory.getLog(MbeansDescriptorsSerSource.class);
+    private static Logger log = Logger.getLogger(MbeansDescriptorsSerSource.class);
     Registry registry;
     String location;
     String type;

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansSource.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansSource.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/modeler/modules/MbeansSource.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -14,13 +14,12 @@
 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.tomcat.util.DomUtil;
 import org.apache.tomcat.util.modeler.AttributeInfo;
 import org.apache.tomcat.util.modeler.BaseModelMBean;
 import org.apache.tomcat.util.modeler.ManagedBean;
 import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.logging.Logger;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 
@@ -37,7 +36,7 @@
  */
 public class MbeansSource extends ModelerSource implements MbeansSourceMBean
 {
-    private static Log log = LogFactory.getLog(MbeansSource.class);
+    private static Logger log = Logger.getLogger(MbeansSource.class);
     Registry registry;
     String type;
 

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/AprEndpoint.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/AprEndpoint.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -22,8 +22,6 @@
 import java.util.HashMap;
 import java.util.concurrent.Executor;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.tomcat.jni.Address;
 import org.apache.tomcat.jni.Error;
 import org.apache.tomcat.jni.File;
@@ -37,6 +35,7 @@
 import org.apache.tomcat.jni.Socket;
 import org.apache.tomcat.jni.Status;
 import org.apache.tomcat.util.res.StringManager;
+import org.jboss.logging.Logger;
 
 /**
  * APR tailored thread pool, providing the following services:
@@ -59,7 +58,7 @@
     // -------------------------------------------------------------- Constants
 
 
-    protected static Log log = LogFactory.getLog(AprEndpoint.class);
+    protected static Logger log = Logger.getLogger(AprEndpoint.class);
 
     protected static StringManager sm =
         StringManager.getManager("org.apache.tomcat.util.net.res");

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/BaseEndpoint.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/BaseEndpoint.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/BaseEndpoint.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -20,9 +20,8 @@
 import java.net.InetAddress;
 import java.util.concurrent.Executor;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
+import org.jboss.logging.Logger;
 
 /**
  * APR tailored thread pool, providing the following services:
@@ -45,7 +44,7 @@
     // -------------------------------------------------------------- Constants
 
 
-    protected static Log log = LogFactory.getLog(BaseEndpoint.class);
+    protected static Logger log = Logger.getLogger(BaseEndpoint.class);
 
     protected static StringManager sm =
         StringManager.getManager("org.apache.tomcat.util.net.res");

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/JIoEndpoint.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/JIoEndpoint.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/JIoEndpoint.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -24,9 +24,8 @@
 import java.net.Socket;
 import java.util.concurrent.Executor;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
+import org.jboss.logging.Logger;
 
 /**
  * Handle incoming TCP connections.
@@ -50,7 +49,7 @@
     // -------------------------------------------------------------- Constants
 
 
-    protected static Log log = LogFactory.getLog(JIoEndpoint.class);
+    protected static Logger log = Logger.getLogger(JIoEndpoint.class);
 
     protected StringManager sm = 
         StringManager.getManager("org.apache.tomcat.util.net.res");

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/NioEndpoint.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/NioEndpoint.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/NioEndpoint.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -49,11 +49,10 @@
 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.tomcat.util.IntrospectionUtils;
 import org.apache.tomcat.util.net.SecureNioChannel.ApplicationBufferHandler;
 import org.apache.tomcat.util.res.StringManager;
+import org.jboss.logging.Logger;
 
 /**
  * NIO tailored thread pool, providing the following services:
@@ -76,7 +75,7 @@
     // -------------------------------------------------------------- Constants
 
 
-    protected static Log log = LogFactory.getLog(NioEndpoint.class);
+    protected static Logger log = Logger.getLogger(NioEndpoint.class);
 
     protected static StringManager sm =
         StringManager.getManager("org.apache.tomcat.util.net.res");

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/NioSelectorPool.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/NioSelectorPool.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/NioSelectorPool.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -25,9 +25,9 @@
 import java.io.EOFException;
 import java.net.SocketTimeoutException;
 import java.util.concurrent.ConcurrentLinkedQueue;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
+import org.jboss.logging.Logger;
+
 /**
  *
  * Thread safe non blocking selector pool
@@ -37,7 +37,7 @@
  */
 
 public class NioSelectorPool {
-    protected static Log log = LogFactory.getLog(NioSelectorPool.class);
+    protected static Logger log = Logger.getLogger(NioSelectorPool.class);
 
     protected final static boolean SHARED =
         Boolean.valueOf(System.getProperty("org.apache.tomcat.util.net.NioSelectorShared", "true")).booleanValue();

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/PoolTcpEndpoint.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/PoolTcpEndpoint.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/PoolTcpEndpoint.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -28,11 +28,10 @@
 import java.util.Stack;
 import java.util.Vector;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
 import org.apache.tomcat.util.threads.ThreadPool;
 import org.apache.tomcat.util.threads.ThreadPoolRunnable;
+import org.jboss.logging.Logger;
 
 /* Similar with MPM module in Apache2.0. Handles all the details related with
    "tcp server" functionality - thread management, accept policy, etc.
@@ -59,7 +58,7 @@
  */
 public class PoolTcpEndpoint implements Runnable { // implements Endpoint {
 
-    static Log log=LogFactory.getLog(PoolTcpEndpoint.class );
+    static Logger log=Logger.getLogger(PoolTcpEndpoint.class );
 
     private StringManager sm = 
         StringManager.getManager("org.apache.tomcat.util.net.res");

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/SSLImplementation.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/SSLImplementation.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/SSLImplementation.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -27,8 +27,8 @@
    @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.jboss.logging.Logger logger =
+        org.jboss.logging.Logger.getLogger(SSLImplementation.class);
 
     // The default implementations in our search path
     private static final String PureTLSImplementationClass=

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/jsse/JSSEImplementation.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/jsse/JSSEImplementation.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/jsse/JSSEImplementation.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -35,8 +35,8 @@
 {
     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.jboss.logging.Logger logger = 
+        org.jboss.logging.Logger.getLogger(JSSEImplementation.class);
 
     private JSSEFactory factory = null;
 

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -88,8 +88,8 @@
     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.jboss.logging.Logger log =
+        org.jboss.logging.Logger.getLogger(JSSESocketFactory.class);
 
     protected boolean initialized;
     protected String clientAuth = "false";

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/jsse/JSSESupport.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/jsse/JSSESupport.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/net/jsse/JSSESupport.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -50,8 +50,8 @@
 
 class JSSESupport implements SSLSupport {
     
-    private static org.apache.commons.logging.Log log =
-        org.apache.commons.logging.LogFactory.getLog(JSSESupport.class);
+    private static org.jboss.logging.Logger log =
+        org.jboss.logging.Logger.getLogger(JSSESupport.class);
 
     protected SSLSocket ssl;
     protected SSLSession session;

Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/util/threads/ThreadPool.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/util/threads/ThreadPool.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/util/threads/ThreadPool.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -19,9 +19,8 @@
 
 import java.util.*;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.tomcat.util.res.StringManager;
+import org.jboss.logging.Logger;
 
 /**
  * A thread pool that is trying to copy the apache process management.
@@ -33,7 +32,7 @@
  */
 public class ThreadPool  {
 
-    private static Log log = LogFactory.getLog(ThreadPool.class);
+    private static Logger log = Logger.getLogger(ThreadPool.class);
 
     private static StringManager sm =
         StringManager.getManager("org.apache.tomcat.util.threads.res");
@@ -367,7 +366,7 @@
         return c;
     }
 
-    private static void logFull(Log loghelper, int currentThreadCount,
+    private static void logFull(Logger loghelper, int currentThreadCount,
                                 int maxThreads) {
 	if( logfull ) {
             log.error(sm.getString("threadpool.busy",

Added: branches/2.0.x/src/share/classes/org/jboss/logging/DynamicLogger.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/DynamicLogger.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/DynamicLogger.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,265 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.logging;
+
+/**
+ * An extension of the JBoss Logger that adds a log()
+ * primitive that maps to a dynamically defined log level.
+ * 
+ * TODO - Make sure serialization works correctly
+ * 
+ * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
+ * @version <tt>$Revision: 2081 $</tt>
+ * 
+ * @since 4.0.3
+ */
+public class DynamicLogger extends Logger
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -5963699806863917370L;
+   
+   /** No logging */
+   public static final int LOG_LEVEL_NONE  = 0;
+
+   /** Fatal level logging */
+   public static final int LOG_LEVEL_FATAL = 1;
+
+   /** Error level logging */
+   public static final int LOG_LEVEL_ERROR = 2;
+
+   /** Warn level logging */
+   public static final int LOG_LEVEL_WARN  = 3;
+
+   /** Info level logging */
+   public static final int LOG_LEVEL_INFO  = 4;
+   
+   /** Debug level logging */
+   public static final int LOG_LEVEL_DEBUG = 5;
+
+   /** Trace level logging */
+   public static final int LOG_LEVEL_TRACE = 6;
+   
+   /** The available log level strings */
+   public final static String[] LOG_LEVEL_STRINGS =
+      { "NONE", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE" }; 
+    
+   /** The log level to use for the "log" primitive */
+   private int logLevel = LOG_LEVEL_DEBUG;
+
+   /**
+    * Create a DynamicLogger instance given the logger name.
+    *
+    * @param name the logger name
+    * @return the dynamic logger
+    */
+   public static DynamicLogger getDynamicLogger(String name)
+   {
+      return new DynamicLogger(name);
+   }
+
+   /**
+    * Create a DynamicLogger instance given the logger name with the given suffix.
+    *
+    * <p>This will include a logger seperator between classname and suffix
+    *
+    * @param name     The logger name
+    * @param suffix   A suffix to append to the classname.
+    * @return the dynamic logger
+    */
+   public static DynamicLogger getDynamicLogger(String name, String suffix)
+   {
+      return new DynamicLogger(name + "." + suffix);
+   }
+
+   /**
+    * Create a DynamicLogger instance given the logger class. This simply
+    * calls create(clazz.getName()).
+    *
+    * @param clazz    the Class whose name will be used as the logger name
+    * @return the dynamic logger
+    */
+   public static DynamicLogger getDynamicLogger(Class clazz)
+   {
+      return new DynamicLogger(clazz.getName());
+   }
+
+   /**
+    * Create a DynamicLogger instance given the logger class with the given suffix.
+    *
+    * <p>This will include a logger seperator between classname and suffix
+    *
+    * @param clazz    The Class whose name will be used as the logger name.
+    * @param suffix   A suffix to append to the classname.
+    * @return the dynamic logger
+    */
+   public static DynamicLogger getDynamicLogger(Class clazz, String suffix)
+   {
+      return new DynamicLogger(clazz.getName() + "." + suffix);
+   }
+
+   /**
+    * Create a new DynamicLogger.
+    * 
+    * @param name the log name
+    */
+   protected DynamicLogger(final String name)
+   {
+      super(name);
+   }
+   
+   /**
+    * Sets the logLevel for the log() primitive
+    * 
+    * @param logLevel between LOG_LEVEL_NONE and LOG_LEVEL_TRACE
+    */
+   public void setLogLevel(int logLevel)
+   {
+      if (logLevel >= LOG_LEVEL_NONE && logLevel <= LOG_LEVEL_TRACE)
+      {
+         this.logLevel = logLevel;
+      }
+   }
+   
+   /**
+    * Gets the logLevel of the log() primitive
+    * 
+    * @return the logLevel of the log() primitive
+    */
+   public int getLogLevel()
+   {
+      return logLevel;
+   }
+   
+   /**
+    * Sets the logLevel of the log() primitive
+    * 
+    * @param logLevelString the log level in String form
+    */
+   public void setLogLevelAsString(String logLevelString)
+   {
+      if (logLevelString != null)
+      {
+         logLevelString = logLevelString.toUpperCase().trim();
+         
+         for (int i = 0; i <= LOG_LEVEL_TRACE; i++)
+         {
+            if (logLevelString.equals(LOG_LEVEL_STRINGS[i]))
+            {
+               // match
+               this.logLevel = i;
+               break;
+            }
+         }
+      }
+   }
+   
+   /**
+    * Gets the logLevel of the log() primitive in String form
+    *
+    * @return the logLevel of the log() primitive in String form
+    */
+   public String getLogLevelAsString()
+   {
+      return LOG_LEVEL_STRINGS[logLevel];
+   }
+   
+   /**
+    * Logs a message using dynamic log level
+    * 
+    * @param message the message to log
+    */
+   public void log(Object message)
+   {
+      switch (logLevel)
+      {
+         case LOG_LEVEL_TRACE:
+            super.trace(message);
+            break;
+            
+         case LOG_LEVEL_DEBUG:
+            super.debug(message);
+            break;
+            
+         case LOG_LEVEL_INFO:
+            super.info(message);
+            break;
+            
+         case LOG_LEVEL_WARN:
+            super.warn(message);
+            break;
+            
+         case LOG_LEVEL_ERROR:
+            super.error(message);
+            break;
+            
+         case LOG_LEVEL_FATAL:
+            super.fatal(message);
+            break;
+            
+         case LOG_LEVEL_NONE:
+         default:
+            // do nothing
+            break;
+      }
+   }
+   
+   /**
+    * Logs a message and a throwable using dynamic log level
+    * 
+    * @param message the message to log
+    * @param t       the throwable to log
+    */
+   public void log(Object message, Throwable t)
+   {
+      switch (logLevel)
+      {
+         case LOG_LEVEL_TRACE:
+            super.trace(message, t);
+            break;
+            
+         case LOG_LEVEL_DEBUG:
+            super.debug(message, t);
+            break;
+            
+         case LOG_LEVEL_INFO:
+            super.info(message, t);
+            break;
+            
+         case LOG_LEVEL_WARN:
+            super.warn(message, t);
+            break;
+            
+         case LOG_LEVEL_ERROR:
+            super.error(message, t);
+            break;
+            
+         case LOG_LEVEL_FATAL:
+            super.fatal(message, t);
+            break;
+            
+         case LOG_LEVEL_NONE:
+         default:
+            // do nothing
+            break;
+      }      
+   }
+}


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/DynamicLogger.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/2.0.x/src/share/classes/org/jboss/logging/Logger.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/Logger.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/Logger.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,434 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.Serializable;
+
+/**
+ * Logger wrapper that tries to dynamically load a log4j class to
+ * determine if log4j is available in the VM. If it is the case,
+ * a log4j delegate is built and used. In the contrary, a null
+ * logger is used. This class cannot directly reference log4j
+ * classes otherwise the JVM will try to load it and make it fail.
+ * To set
+ *
+ * <p>Only exposes the relevent factory and logging methods.
+ * 
+ * <p>For JBoss the logging should be done as follows:
+ * <ul>
+ * <li>FATAL - JBoss is likely to/will crash
+ * <li>ERROR - A definite problem
+ * <li>WARN - Likely to be a problem, or it could be JBoss
+ *            detected a problem it can recover from
+ * <li>INFO - Lifecycle low volume, e.g. "Bound x into jndi",
+ *            things that are of interest to a user
+ * <li>DEBUG - Lifecycle low volume but necessarily of interest 
+ *             to the user, e.g. "Starting listener thread"
+ * <li>TRACE - High volume detailed logging
+ * </ul>
+ *
+ * @see #isTraceEnabled
+ * @see #trace(Object)
+ * @see #trace(Object,Throwable)
+ *
+ * @version <tt>$Revision: 2081 $</tt>
+ * @author  Scott.Stark at jboss.org
+ * @author  <a href="mailto:jason at planet57.com">Jason Dillon</a>
+ * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>
+ */
+public class Logger implements Serializable
+{
+   /** Serialization */
+   private static final long serialVersionUID = 4232175575988879434L;
+
+   /** The system property to look for an externalized LoggerPlugin implementation class */
+   protected static String PLUGIN_CLASS_PROP = "org.jboss.logging.Logger.pluginClass";
+
+   /** The default LoggerPlugin implementation is log4j */
+   protected static final String DEFAULT_PLUGIN_CLASS_NAME = "org.jboss.logging.jdk.JDK14LoggerPlugin";
+
+   /** The LoggerPlugin implementation class to use */
+   protected static Class pluginClass = null;
+
+   /** The class name of the LoggerPlugin implementation class to use */
+   protected static String pluginClassName = null;
+
+   static
+   {
+      init();
+   }
+
+   /** The logger name. */
+   private final String name;
+
+   /** The logger plugin delegate */
+   protected transient LoggerPlugin loggerDelegate = null;
+
+   /** The LoggerPlugin implementation class name in use
+    * 
+    * @return LoggerPlugin implementation class name
+    */
+   public static String getPluginClassName()
+   {
+      return Logger.pluginClassName;
+   }
+
+   /**
+    * Set the LoggerPlugin implementation class name in use
+    * 
+    * @param pluginClassName the LoggerPlugin implementation class name
+    */
+   public static void setPluginClassName(String pluginClassName)
+   {
+      if (pluginClassName.equals(Logger.pluginClassName) == false)
+      {
+         Logger.pluginClassName = pluginClassName;
+         init();
+      }
+   }
+
+   /**
+    * Creates new Logger the given logger name.
+    *
+    * @param name the logger name.
+    */
+   protected Logger(final String name)
+   {
+      this.name = name;
+      this.loggerDelegate = getDelegatePlugin(name);
+   }
+
+   /**
+    * Return the name of this logger.
+    *
+    * @return The name of this logger.
+    */
+   public String getName()
+   {
+      return name;
+   }
+
+   /**
+    * Get the logger plugin delegate
+    * 
+    * @return the delegate
+    */
+   public LoggerPlugin getLoggerPlugin()
+   {
+      return this.loggerDelegate;
+   }
+
+   /**
+    * Check to see if the TRACE level is enabled for this logger.
+    *
+    * @return true if a {@link #trace(Object)} method invocation would pass
+    *         the msg to the configured appenders, false otherwise.
+    */
+   public boolean isTraceEnabled()
+   {
+      return loggerDelegate.isTraceEnabled();
+   }
+
+   /**
+    * Issue a log msg with a level of TRACE.
+    * 
+    * @param message the message
+    */
+   public void trace(Object message)
+   {
+      loggerDelegate.trace(message);
+   }
+
+   /**
+    * Issue a log msg and throwable with a level of TRACE.
+    * 
+    * @param message the message
+    * @param t the throwable
+    */
+   public void trace(Object message, Throwable t)
+   {
+      loggerDelegate.trace(message, t);
+   }
+
+   /**
+    * Check to see if the DEBUG level is enabled for this logger.
+    *
+    * @deprecated DEBUG is for low volume logging, you don't need this
+    * @return true if a {@link #trace(Object)} method invocation would pass
+    * the msg to the configured appenders, false otherwise.
+    */
+   public boolean isDebugEnabled()
+   {
+      return loggerDelegate.isDebugEnabled();
+   }
+
+   /**
+    * Issue a log msg with a level of DEBUG.
+    * 
+    * @param message the message
+    */
+   public void debug(Object message)
+   {
+      loggerDelegate.debug(message);
+   }
+
+   /**
+    * Issue a log msg and throwable with a level of DEBUG.
+    * 
+    * @param message the message
+    * @param t the throwable
+    */
+   public void debug(Object message, Throwable t)
+   {
+      loggerDelegate.debug(message, t);
+   }
+
+   /**
+    * Check to see if the INFO level is enabled for this logger.
+    *
+    * @deprecated INFO is for low volume information, you don't need this
+    * @return true if a {@link #info(Object)} method invocation would pass
+    * the msg to the configured appenders, false otherwise.
+    */
+   public boolean isInfoEnabled()
+   {
+      return loggerDelegate.isInfoEnabled();
+   }
+
+   /**
+    * Issue a log msg with a level of INFO.
+    * 
+    * @param message the message
+    */
+   public void info(Object message)
+   {
+      loggerDelegate.info(message);
+   }
+
+   /**
+    * Issue a log msg and throwable with a level of INFO.
+    * 
+    * @param message the message
+    * @param t the throwable
+    */
+   public void info(Object message, Throwable t)
+   {
+      loggerDelegate.info(message, t);
+   }
+
+   /**
+    * Issue a log msg with a level of WARN.
+    * 
+    * @param message the message
+    */
+   public void warn(Object message)
+   {
+      loggerDelegate.warn(message);
+   }
+
+   /**
+    * Issue a log msg and throwable with a level of WARN.
+    * 
+    * @param message the message
+    * @param t the throwable
+    */
+   public void warn(Object message, Throwable t)
+   {
+      loggerDelegate.warn(message, t);
+   }
+
+   /**
+    * Issue a log msg with a level of ERROR.
+    * 
+    * @param message the message
+    */
+   public void error(Object message)
+   {
+      loggerDelegate.error(message);
+   }
+
+   /**
+    * Issue a log msg and throwable with a level of ERROR.
+    * 
+    * @param message the message
+    * @param t the throwable
+    */
+   public void error(Object message, Throwable t)
+   {
+      loggerDelegate.error(message, t);
+   }
+
+   /**
+    * Issue a log msg with a level of FATAL.
+    * 
+    * @param message the message
+    */
+   public void fatal(Object message)
+   {
+      loggerDelegate.fatal(message);
+   }
+
+   /**
+    * Issue a log msg and throwable with a level of FATAL.
+    * 
+    * @param message the message
+    * @param t the throwable
+    */
+   public void fatal(Object message, Throwable t)
+   {
+      loggerDelegate.fatal(message, t);
+   }
+
+   /**
+    * Custom serialization to reinitalize the delegate
+    * 
+    * @param stream the object stream
+    * @throws IOException for any error
+    * @throws ClassNotFoundException if a class is not found during deserialization
+    */
+   private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
+   {
+      // restore non-transient fields (aka name)
+      stream.defaultReadObject();
+
+      // Restore logging
+      if (pluginClass == null)
+      {
+         init();
+      }
+      this.loggerDelegate = getDelegatePlugin(name);
+   }
+
+   /**
+    * Create a Logger instance given the logger name.
+    *
+    * @param name the logger name
+    * @return the logger
+    */
+   public static Logger getLogger(String name)
+   {
+      return new Logger(name);
+   }
+
+   /**
+    * Create a Logger instance given the logger name with the given suffix.
+    *
+    * <p>This will include a logger seperator between classname and suffix
+    *
+    * @param name the logger name
+    * @param suffix a suffix to append to the classname.
+    * @return the logger
+    */
+   public static Logger getLogger(String name, String suffix)
+   {
+      return new Logger(name + "." + suffix);
+   }
+
+   /**
+    * Create a Logger instance given the logger class. This simply
+    * calls create(clazz.getName()).
+    *
+    * @param clazz the Class whose name will be used as the logger name
+    * @return the logger
+    */
+   public static Logger getLogger(Class clazz)
+   {
+      return new Logger(clazz.getName());
+   }
+
+   /**
+    * Create a Logger instance given the logger class with the given suffix.
+    *
+    * <p>This will include a logger seperator between classname and suffix
+    *
+    * @param clazz the Class whose name will be used as the logger name.
+    * @param suffix a suffix to append to the classname.
+    * @return the logger
+    */
+   public static Logger getLogger(Class clazz, String suffix)
+   {
+      return new Logger(clazz.getName() + "." + suffix);
+   }
+
+   /**
+    * Get the delegate plugin
+    * 
+    * @param name the name of the logger
+    * @return the plugin
+    */
+   protected static LoggerPlugin getDelegatePlugin(String name)
+   {
+      LoggerPlugin plugin = null;
+      try
+      {
+         plugin = (LoggerPlugin) pluginClass.newInstance();
+      }
+      catch (Throwable e)
+      {
+         plugin = new NullLoggerPlugin();
+      }
+      try
+      {
+         plugin.init(name);
+      }
+      catch (Throwable e)
+      {
+         String extraInfo = e.getMessage();
+         System.err.println("Failed to initalize plugin: " + plugin
+               + (extraInfo != null ? ", cause: " + extraInfo : ""));
+         plugin = new NullLoggerPlugin();
+      }
+
+      return plugin;
+   }
+
+   /**
+    * Initialize the LoggerPlugin class to use as the delegate to the
+    * logging system. This first checks to see if a pluginClassName has
+    * been specified via the {@link #setPluginClassName(String)} method,
+    * then the PLUGIN_CLASS_PROP system property and finally the
+    * LOG4J_PLUGIN_CLASS_NAME default. If the LoggerPlugin implementation
+    * class cannot be loaded the default NullLoggerPlugin will be used.
+    */
+   protected static void init()
+   {
+      try
+      {
+         // See if there is a PLUGIN_CLASS_PROP specified
+         if (pluginClassName == null)
+         {
+            pluginClassName = System.getProperty(PLUGIN_CLASS_PROP, DEFAULT_PLUGIN_CLASS_NAME);
+         }
+
+         // Try to load the plugin via the TCL
+         ClassLoader cl = Thread.currentThread().getContextClassLoader();
+         pluginClass = cl.loadClass(pluginClassName);
+      }
+      catch (Throwable e)
+      {
+         // The plugin could not be setup, default to a null logger
+         pluginClass = org.jboss.logging.NullLoggerPlugin.class;
+      }
+   }
+}


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/Logger.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/2.0.x/src/share/classes/org/jboss/logging/LoggerPlugin.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/LoggerPlugin.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/LoggerPlugin.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,158 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+/**
+ * Defines a "pluggable" login module. In fact, this is only used to split between 
+ * log4j and /dev/null. Choice is made in org.jboss.logging.Logger
+ *
+ * @see org.jboss.logging.Logger
+ * @see org.jboss.logging.NullLoggerPlugin
+ *
+ * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
+ * @version $Revision: 2081 $
+ */
+public interface LoggerPlugin
+{
+   /**
+    * Initialise the logger with the given name
+    * 
+    * @param name the name
+    */
+   void init(String name);
+
+   /**
+    * Check to see if the TRACE level is enabled for this logger.
+    *
+    * @return true if a {@link #trace(Object)} method invocation would pass
+    *         the msg to the configured appenders, false otherwise.
+    */
+   boolean isTraceEnabled();
+
+   /**
+    * Issue a log msg with a level of TRACE.
+    * 
+    * @param message the message
+    */
+   void trace(Object message);
+
+   /**
+    * Issue a log msg and throwable with a level of TRACE.
+    * 
+    * @param message the message
+    * @param t the throwable
+    */
+   void trace(Object message, Throwable t);
+
+   /**
+    * Check to see if the DEBUG level is enabled for this logger.
+    *
+    * @deprecated DEBUG is for low volume logging, you don't need this
+    * @return true if a {@link #trace(Object)} method invocation would pass
+    * the msg to the configured appenders, false otherwise.
+    */
+   boolean isDebugEnabled();
+
+   /**
+    * Issue a log msg with a level of DEBUG.
+    * 
+    * @param message the message
+    */
+   void debug(Object message);
+
+   /**
+    * Issue a log msg and throwable with a level of DEBUG.
+    * 
+    * @param message the message
+    * @param t the throwable
+    */
+   void debug(Object message, Throwable t);
+
+   /**
+    * Check to see if the INFO level is enabled for this logger.
+    *
+    * @deprecated INFO is for low volume information, you don't need this
+    * @return true if a {@link #info(Object)} method invocation would pass
+    * the msg to the configured appenders, false otherwise.
+    */
+   boolean isInfoEnabled();
+
+   /**
+    * Issue a log msg with a level of INFO.
+    * 
+    * @param message the message
+    */
+   void info(Object message);
+
+   /**
+    * Issue a log msg and throwable with a level of INFO.
+    * 
+    * @param message the message
+    * @param t the throwable
+    */
+   void info(Object message, Throwable t);
+
+   /**
+    * Issue a log msg with a level of WARN.
+    * 
+    * @param message the message
+    */
+   void warn(Object message);
+
+   /**
+    * Issue a log msg and throwable with a level of WARN.
+    * 
+    * @param message the message
+    * @param t the throwable
+    */
+   void warn(Object message, Throwable t);
+
+   /**
+    * Issue a log msg with a level of ERROR.
+    * 
+    * @param message the message
+    */
+   void error(Object message);
+
+   /**
+    * Issue a log msg and throwable with a level of ERROR.
+    * 
+    * @param message the message
+    * @param t the throwable
+    */
+   void error(Object message, Throwable t);
+
+   /**
+    * Issue a log msg with a level of FATAL.
+    * 
+    * @param message the message
+    */
+   void fatal(Object message);
+
+   /**
+    * Issue a log msg and throwable with a level of FATAL.
+    * 
+    * @param message the message
+    * @param t the throwable
+    */
+   void fatal(Object message, Throwable t);
+}


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/LoggerPlugin.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/2.0.x/src/share/classes/org/jboss/logging/MDC.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/MDC.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/MDC.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+import java.util.Map;
+
+/**
+ * A "Map Diagnostic Context" abstraction.
+ *
+ * @author Jason T. Greene
+ */
+public class MDC
+{
+   private final static MDCProvider mdc;
+
+   static
+   {
+      MDCProvider m = null;
+      if (NDCSupport.class.isAssignableFrom(Logger.pluginClass))
+      {
+
+         try
+         {
+            m = ((MDCSupport) Logger.pluginClass.newInstance()).getMDCProvider();
+         }
+         catch (Throwable t)
+         {
+            // Eat
+         }
+      }
+
+      if (m == null)
+         m = new NullMDCProvider();
+
+      mdc = m;
+   }
+
+   public static void put(String key, Object val)
+   {
+      mdc.put(key, val);
+   }
+
+   public static Object get(String key)
+   {
+      return mdc.get(key);
+   }
+
+   public static void remove(String key)
+   {
+      mdc.remove(key);
+   }
+
+   public static Map<String, Object> getMap()
+   {
+      return mdc.getMap();
+   }
+}


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/MDC.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/2.0.x/src/share/classes/org/jboss/logging/MDCProvider.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/MDCProvider.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/MDCProvider.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+import java.util.Map;
+
+/**
+ * MDC SPI for the backend logging implementation.
+ *
+ * @author Jason T. Greene
+ */
+public interface MDCProvider
+{
+   public void put(String key, Object value);
+
+   public Object get(String key);
+
+   public void remove(String key);
+
+   public Map<String, Object> getMap();
+}


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/MDCProvider.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/2.0.x/src/share/classes/org/jboss/logging/MDCSupport.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/MDCSupport.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/MDCSupport.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+/**
+ * Indicates that a Logger plugin supports MDC.
+ *
+ * @author Jason T. Greene
+ */
+public interface MDCSupport
+{
+   public MDCProvider getMDCProvider();
+}


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/MDCSupport.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/2.0.x/src/share/classes/org/jboss/logging/NDC.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/NDC.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/NDC.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+
+/**
+ * A "Nested Diagnostic Context" abstraction.
+ *
+ * @author Jason T. Greene
+ */
+public class NDC
+{
+   private final static NDCProvider ndc;
+
+   static
+   {
+      NDCProvider n = null;
+      if (NDCSupport.class.isAssignableFrom(Logger.pluginClass))
+      {
+
+         try
+         {
+            n = ((NDCSupport) Logger.pluginClass.newInstance()).getNDCProvider();
+         }
+         catch (Throwable t)
+         {
+            // Eat
+         }
+      }
+
+      if (n == null)
+         n = new NullNDCProvider();
+
+      ndc = n;
+   }
+
+   public static void clear()
+   {
+      ndc.clear();
+   }
+
+   public static String get()
+   {
+      return ndc.get();
+   }
+
+   public static int getDepth()
+   {
+      return ndc.getDepth();
+   }
+
+   public static String pop()
+   {
+      return ndc.pop();
+   }
+
+   public static String peek()
+   {
+      return ndc.peek();
+   }
+
+   public static void push(String message)
+   {
+      ndc.push(message);
+   }
+
+   public static void setMaxDepth(int maxDepth)
+   {
+      ndc.setMaxDepth(maxDepth);
+   }
+}


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/NDC.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/2.0.x/src/share/classes/org/jboss/logging/NDCProvider.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/NDCProvider.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/NDCProvider.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+
+/**
+ * An NDC SPI for the backend logging implementation.
+ *
+ * @author Jason T. Greene
+ */
+public interface NDCProvider
+{
+   public void clear();
+
+   public String get();
+
+   public int getDepth();
+
+   public String pop();
+
+   public String peek();
+
+   public void push(String message);
+
+   public void setMaxDepth(int maxDepth);
+}
\ No newline at end of file


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/NDCProvider.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/2.0.x/src/share/classes/org/jboss/logging/NDCSupport.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/NDCSupport.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/NDCSupport.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+/**
+ * Indicates that a logger plugin supports NDC.
+ *
+ * @author Jason T. Greene
+ */
+public interface NDCSupport
+{
+   public NDCProvider getNDCProvider();
+}


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/NDCSupport.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/2.0.x/src/share/classes/org/jboss/logging/NullLoggerPlugin.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/NullLoggerPlugin.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/NullLoggerPlugin.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+/**
+ * LoggerPlugin implementation producing no output at all. Used for client
+ * side logging when no log4j.jar is available on the classpath.
+ *
+ * @see org.jboss.logging.Logger
+ * @see org.jboss.logging.LoggerPlugin
+ *
+ * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
+ * @version $Revision: 2081 $
+ */
+public class NullLoggerPlugin implements LoggerPlugin
+{
+   public void init(String name)
+   { 
+      /* don't care */
+   }
+
+   public boolean isTraceEnabled()
+   {
+      return false;
+   }
+
+   public void trace(Object message)
+   {
+      // nothing
+   }
+
+   public void trace(Object message, Throwable t)
+   {
+      // nothing
+   }
+
+   public boolean isDebugEnabled()
+   {
+      return false;
+   }
+
+   public void debug(Object message)
+   {
+      // nothing
+   }
+
+   public void debug(Object message, Throwable t)
+   {
+      // nothing
+   }
+
+   public boolean isInfoEnabled()
+   {
+      return false;
+   }
+
+   public void info(Object message)
+   {
+      // nothing
+   }
+
+   public void info(Object message, Throwable t)
+   {
+      // nothing
+   }
+
+   public void error(Object message)
+   {
+      // nothing
+   }
+
+   public void error(Object message, Throwable t)
+   {
+      // nothing
+   }
+
+   public void fatal(Object message)
+   {
+      // nothing
+   }
+
+   public void fatal(Object message, Throwable t)
+   {
+      // nothing
+   }
+
+   public void warn(Object message)
+   {
+      // nothing
+   }
+
+   public void warn(Object message, Throwable t)
+   {
+      // nothing
+   }
+}


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/NullLoggerPlugin.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/2.0.x/src/share/classes/org/jboss/logging/NullMDCProvider.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/NullMDCProvider.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/NullMDCProvider.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+import java.util.Map;
+
+/**
+ * An MDC provider which does nothing.
+ *
+ * @author Jason T. Greene
+ */
+public class NullMDCProvider implements MDCProvider
+{
+   public Object get(String key)
+   {
+      return null;
+   }
+
+   public Map<String, Object> getMap()
+   {
+      return null;
+   }
+
+   public void put(String key, Object val)
+   {
+   }
+
+   public void remove(String key)
+   {
+   }
+}
\ No newline at end of file


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/NullMDCProvider.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/2.0.x/src/share/classes/org/jboss/logging/NullNDCProvider.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/NullNDCProvider.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/NullNDCProvider.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging;
+
+import java.util.Stack;
+
+/**
+ * An NDC provider which does nothing.
+ *
+ * @author Jason T. Greene
+ */
+public class NullNDCProvider implements NDCProvider
+{
+   public void clear()
+   {
+   }
+
+   public Stack cloneStack()
+   {
+      return null;
+   }
+
+   public String get()
+   {
+      return null;
+   }
+
+   public int getDepth()
+   {
+      return 0;
+   }
+
+   public void inherit(Stack stack)
+   {
+   }
+
+   public String peek()
+   {
+      return null;
+   }
+
+   public String pop()
+   {
+      return null;
+   }
+
+   public void push(String message)
+   {
+   }
+
+   public void remove()
+   {
+   }
+
+   public void setMaxDepth(int maxDepth)
+   {
+   }
+}


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/NullNDCProvider.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDK14LoggerPlugin.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDK14LoggerPlugin.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDK14LoggerPlugin.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,154 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.jdk;
+
+import java.util.logging.Logger;
+import java.util.logging.Level;
+
+import org.jboss.logging.LoggerPlugin;
+import org.jboss.logging.MDCProvider;
+import org.jboss.logging.MDCSupport;
+import org.jboss.logging.NDCProvider;
+import org.jboss.logging.NDCSupport;
+
+/** An example LoggerPlugin which uses the JDK java.util.logging framework.
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revison:$
+ */
+public class JDK14LoggerPlugin implements LoggerPlugin, MDCSupport, NDCSupport
+{
+   private Logger log;
+
+   public void init(String name)
+   {
+      log = Logger.getLogger(name);
+   }
+
+   public boolean isTraceEnabled()
+   {
+      return log.isLoggable(Level.FINER);
+   }
+
+   public void trace(Object message)
+   {
+       log(Level.FINER, String.valueOf(message), null);
+   }
+
+   public void trace(Object message, Throwable t)
+   {
+      log(Level.FINER, String.valueOf(message), t);
+   }
+
+   public boolean isDebugEnabled()
+   {
+      return log.isLoggable(Level.FINE);
+   }
+
+   public void debug(Object message)
+   {
+       log(Level.FINE, String.valueOf(message), null);
+   }
+
+   public void debug(Object message, Throwable t)
+   {
+      log(Level.FINE, String.valueOf(message), t);
+   }
+
+   public boolean isInfoEnabled()
+   {
+      return log.isLoggable(Level.INFO);
+   }
+
+   public void info(Object message)
+   {
+       log(Level.INFO, String.valueOf(message), null);
+   }
+
+   public void info(Object message, Throwable t)
+   {
+      log(Level.INFO, String.valueOf(message), t);
+   }
+
+   public void warn(Object message)
+   {
+       log(Level.WARNING, String.valueOf(message), null);
+   }
+
+   public void warn(Object message, Throwable t)
+   {
+       log(Level.WARNING, String.valueOf(message), t);
+   }
+
+   public void error(Object message)
+   {
+       log(Level.SEVERE, String.valueOf(message), null);
+   }
+
+   public void error(Object message, Throwable t)
+   {
+       log(Level.SEVERE, String.valueOf(message), t);
+   }
+
+   public void fatal(Object message)
+   {
+       log(Level.SEVERE, String.valueOf(message), null);
+   }
+
+   public void fatal(Object message, Throwable t)
+   {
+       log(Level.SEVERE, String.valueOf(message), t);
+   }
+
+   // From commons-logging
+   private void log(Level level, String msg, Throwable ex) {
+       if (log.isLoggable(level)) {
+           // 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 > 3) {
+               StackTraceElement caller = locations[3];
+               cname = caller.getClassName();
+               method = caller.getMethodName();
+           }
+           if (ex == null) {
+               log.logp(level, cname, method, msg);
+           } else {
+               log.logp(level, cname, method, msg, ex);
+           }
+       }
+   }
+
+   public NDCProvider getNDCProvider()
+   {
+      return new JDKNDCProvider();
+   }
+
+   public MDCProvider getMDCProvider()
+   {
+      return new JDKMDCProvider();
+   }
+}


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDK14LoggerPlugin.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDKMDCProvider.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDKMDCProvider.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDKMDCProvider.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging.jdk;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.logging.MDCProvider;
+
+/**
+ * MDC implementation for JDK logging.
+ *
+ * @author Jason T. Greene
+ */
+public class JDKMDCProvider implements MDCProvider
+{
+   private ThreadLocal<Map<String, Object>> map = new ThreadLocal<Map<String, Object>>();
+
+   public Object get(String key)
+   {
+      return map.get() == null ? null : map.get().get(key);
+   }
+
+   public Map<String, Object> getMap()
+   {
+      return map.get();
+   }
+
+   public void put(String key, Object value)
+   {
+      Map<String, Object> map = this.map.get();
+      if (map == null)
+      {
+         map = new HashMap<String, Object>();
+         this.map.set(map);
+      }
+
+      map.put(key, value);
+   }
+
+   public void remove(String key)
+   {
+      Map<String, Object> map = this.map.get();
+      if (map == null)
+         return;
+
+      map.remove(key);
+   }
+}
\ No newline at end of file


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDKMDCProvider.java
___________________________________________________________________
Name: svn:eol-style
   + native

Added: branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDKNDCProvider.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDKNDCProvider.java	                        (rev 0)
+++ branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDKNDCProvider.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.logging.jdk;
+
+import java.util.ArrayList;
+import java.util.EmptyStackException;
+import java.util.Stack;
+
+import org.jboss.logging.NDCProvider;
+
+/**
+ * NDC implementation for JDK logging
+ *
+ * @author Jason T. Greene
+ */
+public class JDKNDCProvider implements NDCProvider
+{
+   private class ArrayStack<E> extends ArrayList<E>
+   {
+      private static final long serialVersionUID = -8520038422243642840L;
+
+      public E pop()
+      {
+         int size = size();
+         if (size == 0)
+            throw new EmptyStackException();
+
+         return remove(size - 1);
+      }
+
+      public E peek()
+      {
+         int size = size();
+         if (size == 0)
+            throw new EmptyStackException();
+
+         return get(size - 1);
+      }
+
+      public void push(E val)
+      {
+         add(val);
+      }
+
+      public void setSize(int newSize)
+      {
+         int size = size();
+         if (newSize >= size || newSize < 0)
+            return;
+
+         removeRange(newSize, size);
+      }
+   }
+
+   private class Entry
+   {
+      private String merged;
+      private String current;
+
+      public Entry(String current)
+      {
+         this.merged = current;
+         this.current = current;
+      }
+
+      public Entry(Entry parent, String current)
+      {
+         this.merged = parent.merged + ' ' + current;
+         this.current = current;
+      }
+   }
+
+   private ThreadLocal<ArrayStack<Entry>> stack = new ThreadLocal<ArrayStack<Entry>>();
+
+   public void clear()
+   {
+      ArrayStack<Entry> stack = this.stack.get();
+      if (stack != null)
+         stack.clear();
+   }
+
+   public String get()
+   {
+      ArrayStack<Entry> stack = this.stack.get();
+
+      return stack == null || stack.isEmpty() ? null : stack.peek().merged;
+   }
+
+   public int getDepth()
+   {
+      ArrayStack<Entry> stack = this.stack.get();
+
+      return stack == null ? 0 : stack.size();
+   }
+
+   public String peek()
+   {
+      ArrayStack<Entry> stack = this.stack.get();
+
+      return stack == null || stack.isEmpty() ? "" : stack.peek().current;
+   }
+
+   public String pop()
+   {
+      ArrayStack<Entry> stack = this.stack.get();
+
+      return stack == null || stack.isEmpty() ? "" : stack.pop().current;
+   }
+
+   public void push(String message)
+   {
+      ArrayStack<Entry> stack = this.stack.get();
+
+      if (stack == null)
+      {
+         stack = new ArrayStack<Entry>();
+         this.stack.set(stack);
+      }
+
+      stack.push(stack.isEmpty() ? new Entry(message) : new Entry(stack.peek(), message));
+   }
+
+   public void setMaxDepth(int maxDepth)
+   {
+      ArrayStack<Entry> stack = this.stack.get();
+
+      if (stack != null)
+         stack.setSize(maxDepth);
+   }
+}


Property changes on: branches/2.0.x/src/share/classes/org/jboss/logging/jdk/JDKNDCProvider.java
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: branches/2.0.x/src/share/classes/org/jboss/web/php/LifecycleListener.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/web/php/LifecycleListener.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/jboss/web/php/LifecycleListener.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -26,8 +26,7 @@
 import org.apache.catalina.Lifecycle;
 import org.apache.catalina.LifecycleEvent;
 import org.apache.catalina.util.StringManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.logging.Logger;
 
 /**
  * Implementation of <code>LifecycleListener</code> that will init and
@@ -41,7 +40,7 @@
 public class LifecycleListener
     implements org.apache.catalina.LifecycleListener {
 
-    private static Log log = LogFactory.getLog(LifecycleListener.class);
+    private static Logger log = Logger.getLogger(LifecycleListener.class);
 
     /**
      * The string manager for this package.

Modified: branches/2.0.x/src/share/classes/org/jboss/web/php/ScriptEnvironment.java
===================================================================
--- branches/2.0.x/src/share/classes/org/jboss/web/php/ScriptEnvironment.java	2007-08-20 15:04:17 UTC (rev 229)
+++ branches/2.0.x/src/share/classes/org/jboss/web/php/ScriptEnvironment.java	2007-08-20 23:47:37 UTC (rev 230)
@@ -38,8 +38,7 @@
 
 import org.apache.catalina.Globals;
 import org.apache.catalina.util.IOTools;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.jboss.logging.Logger;
 
 
 /**
@@ -52,7 +51,7 @@
  */
 public class ScriptEnvironment {
 
-    private static Log log = LogFactory.getLog(ScriptEnvironment.class);
+    private static Logger log = Logger.getLogger(ScriptEnvironment.class);
 
     /**
      * The Request attribute key for the client certificate chain.




More information about the jbossweb-commits mailing list