[jboss-svn-commits] JBL Code SVN: r8136 - in labs/jbosstm/trunk/common: . classes/com/arjuna/common/internal/util/logging/jakarta classes/com/arjuna/common/util/logging tests/com/hp/mwtests/commonlogging/testlevels

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Dec 8 06:09:07 EST 2006


Author: jhalliday
Date: 2006-12-08 06:09:02 -0500 (Fri, 08 Dec 2006)
New Revision: 8136

Added:
   labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/jakarta/JakartaRelevelingLogFactory.java
   labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/jakarta/JakartaRelevelingLogger.java
Modified:
   labs/jbosstm/trunk/common/build.xml
   labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/LogFactory.java
   labs/jbosstm/trunk/common/tests/com/hp/mwtests/commonlogging/testlevels/TestLevels.java
Log:
Added support for a new logger plugin that rewrites log levels, for use inside the app server. see e.g. http://www.jboss.com/index.html?module=bb&op=viewtopic&t=93949


Modified: labs/jbosstm/trunk/common/build.xml
===================================================================
--- labs/jbosstm/trunk/common/build.xml	2006-12-08 10:47:21 UTC (rev 8135)
+++ labs/jbosstm/trunk/common/build.xml	2006-12-08 11:09:02 UTC (rev 8136)
@@ -1,20 +1,20 @@
 <!--
   JBoss, Home of Professional Open Source
-  Copyright 2006, Red Hat Middleware LLC, and individual contributors 
-  as indicated by the @author tags. 
+  Copyright 2006, Red Hat Middleware LLC, and individual contributors
+  as indicated by the @author tags.
   See the copyright.txt in the distribution for a
-  full listing of individual contributors. 
+  full listing of individual contributors.
   This copyrighted material is made available to anyone wishing to use,
   modify, copy, or redistribute it subject to the terms and conditions
   of the GNU Lesser General Public License, v. 2.1.
-  This program is distributed in the hope that it will be useful, but WITHOUT A 
-  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+  This program is distributed in the hope that it will be useful, but WITHOUT A
+  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,
   v.2.1 along with this distribution; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
   MA  02110-1301, USA.
-  
+
   (C) 2005-2006,
   @author JBoss Inc.
 -->
@@ -45,11 +45,11 @@
     <!-- Path names -->
 	<property name="com.arjuna.buildsystem.dir" location="${buildsystem.dir}"/>
 	<property name="com.arjuna.buildsystem.build.lib" location="${com.arjuna.buildsystem.dir}/build/lib"/>
-	
+
 	<property name="com.arjuna.common.src" location="classes"/>
 	<property name="com.arjuna.common.etc" location="etc"/>
     <property name="com.hp.mwlabs.ts.common.tests.src" location="tests/"/>
-	
+
     <property name="com.arjuna.common.destroot" location="build"/>
     <property name="com.hp.mwlabs.ts.common.jar.dest" location="${com.arjuna.common.destroot}/lib"/>
     <property name="com.hp.mwlabs.ts.common.dest" location="${com.arjuna.common.destroot}/classes"/>
@@ -65,8 +65,9 @@
     <property name="com.hp.mw.ts.common.csf.compile" value="yes"/>
 
     <property name="com.hp.mwlabs.ts.common.resourcebundle" value="common_msg_en_US.properties"/>
+	<property name="com.hp.mwlabs.ts.common.tests.resourcebundle" value="TestLevels_en_US.properties"/>
 
-    <!-- Initialisation -->
+	<!-- Initialisation -->
     <target name="com.hp.mwlabs.ts.common.init">
         <!-- Define default build properties -->
         <tstamp>
@@ -82,7 +83,7 @@
 		<fileset dir="${com.arjuna.buildsystem.build.lib}"/>
 	</path>
 	<property name="com.arjuna.buildsystem.classpath" refid="com.arjuna.buildsystem.classpath"/>
-	
+
         <!-- Define classpath builder task -->
         <taskdef name="classpath-builder" classname="com.hp.mw.buildsystem.ant.ClasspathBuilder" classpath="${com.arjuna.buildsystem.classpath}"/>
 
@@ -159,7 +160,7 @@
                 <path path="${com.arjuna.common.src}"/>
             </classpath>
         </javac>
-    	
+
         <!-- Process the properties -->
     	<property name="property.file" value="common.properties"/>
     	<propertyfile file="${com.hp.mwlabs.ts.common.dest}/${property.file}">
@@ -204,7 +205,7 @@
 
     </target>
 
-    <target name="com.hp.mw.ts.common.tests.compile" depends="com.hp.mw.ts.common.jar" if="com.hp.mwlabs.ts.common.tests.compile">
+    <target name="com.hp.mw.ts.common.tests.compile" depends="com.hp.mw.ts.common.jar, com.hp.mwlabs.ts.common.tests.generateresourcebundle" if="com.hp.mwlabs.ts.common.tests.compile">
 
         <echo message="Building tests"/>
 
@@ -291,7 +292,34 @@
 
     </target>
 
-    <!-- Short target names -->
+	<target name="com.hp.mwlabs.ts.common.tests.generateresourcebundle">
+
+		<echo message="Generating Common Tests Resource Bundle"/>
+
+		<classpath-builder filename="${com.hp.mwlabs.classpathbuilderfilename}" inproperty="build.classpath"/>
+
+		<javadoc sourcepath="${com.hp.mwlabs.ts.common.tests.src}"
+			packagenames="*"
+			failonerror="yes"
+			private="yes"
+			defaultexcludes="yes"
+			classpath="${build.classpath}">
+
+			<doclet name="com.hp.mw.buildsystem.doclet.resbundledoclet.ResourceBundleDoclet">
+				<path>
+					<pathelement path="${com.arjuna.buildsystem.classpath}"/>
+				</path>
+				<param name="-basedir" value="${com.hp.mwlabs.ts.common.tests.dest}"/>
+				<param name="-resourcebundle" value="${com.hp.mwlabs.ts.common.tests.resourcebundle}"/>
+				<param name="-appendkey" value="[]"/>
+			</doclet>
+		</javadoc>
+
+	</target>
+
+
+
+	<!-- Short target names -->
     <target name="compile" depends="com.arjuna.common.compile"/>
     <target name="jar" depends="com.hp.mw.ts.common.jar"/>
     <target name="clean" depends="com.hp.mw.ts.common.clean"/>

Added: labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/jakarta/JakartaRelevelingLogFactory.java
===================================================================
--- labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/jakarta/JakartaRelevelingLogFactory.java	2006-12-08 10:47:21 UTC (rev 8135)
+++ labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/jakarta/JakartaRelevelingLogFactory.java	2006-12-08 11:09:02 UTC (rev 8136)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2006,
+ * @author JBoss Inc.
+ */
+package com.arjuna.common.internal.util.logging.jakarta;
+
+import com.arjuna.common.internal.util.logging.LogFactoryInterface;
+import com.arjuna.common.internal.util.logging.AbstractLogInterface;
+import com.arjuna.common.util.exceptions.LogConfigurationException;
+
+/**
+ * JavaDoc
+ *
+ * @author Jonathan Halliday <jonathan.halliday at redhat.com>
+ * @version $Revision: 2342 $ $Date: 2006-03-30 14:06:17 +0100 (Thu, 30 Mar 2006) $
+ */
+public class JakartaRelevelingLogFactory implements LogFactoryInterface
+{
+   /**
+    * Convenience method to return a named logger, without the application
+    * having to care about factories.
+    *
+    * @param clazz Class for which a log name will be derived
+    *
+    * @exception com.arjuna.common.util.exceptions.LogConfigurationException if a suitable <code>Log</code>
+    *  instance cannot be returned
+    */
+   public AbstractLogInterface getLog(Class clazz) throws LogConfigurationException
+   {
+      try
+      {
+         // get a new logger from the log subsystem's factory and wrap it into a LogInterface
+         return new JakartaRelevelingLogger(org.apache.commons.logging.LogFactory.getLog(clazz));
+      }
+      catch (org.apache.commons.logging.LogConfigurationException lce)
+      {
+         throw new LogConfigurationException(lce.getMessage());
+      }
+   }
+
+   /**
+    * Convenience method to return a named logger, without the application
+    * having to care about factories.
+    *
+    * @param name Logical name of the <code>Log</code> instance to be
+    *  returned (the meaning of this name is only known to the underlying
+    *  logging implementation that is being wrapped)
+    *
+    * @exception LogConfigurationException if a suitable <code>Log</code>
+    *  instance cannot be returned
+    */
+   public AbstractLogInterface getLog(String name) throws LogConfigurationException
+   {
+      try
+      {
+         // get a new logger from the log subsystem's factory and wrap it into a LogInterface
+         return new JakartaRelevelingLogger(org.apache.commons.logging.LogFactory.getLog(name));
+      }
+      catch (org.apache.commons.logging.LogConfigurationException lce)
+      {
+         throw new LogConfigurationException(lce.getMessage());
+      }
+   }
+}

Added: labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/jakarta/JakartaRelevelingLogger.java
===================================================================
--- labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/jakarta/JakartaRelevelingLogger.java	2006-12-08 10:47:21 UTC (rev 8135)
+++ labs/jbosstm/trunk/common/classes/com/arjuna/common/internal/util/logging/jakarta/JakartaRelevelingLogger.java	2006-12-08 11:09:02 UTC (rev 8136)
@@ -0,0 +1,270 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * (C) 2006,
+ * @author JBoss Inc.
+ */
+
+package com.arjuna.common.internal.util.logging.jakarta;
+
+import com.arjuna.common.internal.util.logging.LogInterface;
+
+/**
+ * The semantics of logging levels used in the JBossTS source code
+ * differs from those used in JBossAS. In order to preserve existing
+ * backwards compatible semantics for standalone use, we won't change
+ * the log levels used in the source. Instead, we provide this plugin
+ * that dynamically changes the specified log level to match the
+ * JBoss semantics.
+ *
+ * The following rules apply:
+ * - INFO level messages are converted into DEBUG level messages.
+ *   (and isInfoEnabled is a synonym for isDebugEnabled)
+ * - All other messages are left at their original level.
+ *
+ * see also:
+ *
+ * http://jira.jboss.com/jira/browse/JBTM-20
+ * http://www.jboss.com/index.html?module=bb&op=viewtopic&t=93949
+ * http://wiki.jboss.org/wiki/Wiki.jsp?page=UsageOfLoggingLevels
+ * http://docs.jboss.org/process-guide/en/html/internationalization.html
+ *
+ * @author Jonathan Halliday <jonathan.halliday at redhat.com>
+ * @version $Revision: 2342 $ $Date: 2006-03-30 14:06:17 +0100 (Thu, 30 Mar 2006) $
+ */
+public class JakartaRelevelingLogger implements LogInterface
+{
+
+   /**
+    * the Jakarta-specific logger.
+    */
+   private org.apache.commons.logging.Log m_log = null;
+
+   protected JakartaRelevelingLogger(org.apache.commons.logging.Log log)
+   {
+      m_log = log;
+   }
+
+   /**
+    * Is DEBUG logging currently enabled?
+    *
+    * Call this method to prevent having to perform expensive operations
+    * (for example, <code>String</code> concatination)
+    * when the log level is more than DEBUG.
+    *
+    * @return  True if the logger is enabled for DEBUG, false otherwise
+    */
+   public boolean isDebugEnabled()
+   {
+      return m_log.isDebugEnabled();
+   }
+
+   /**
+    * Is INFO (a.k.a. DEBUG) logging currently enabled?
+    *
+    * Call this method to prevent having to perform expensive operations
+    * (for example, <code>String</code> concatination)
+    * when the log level is more than INFO.
+    *
+    * @return  True if the logger is enabled for INFO, false otherwise
+    */
+   public boolean isInfoEnabled()
+   {
+      return m_log.isDebugEnabled(); // level changed
+   }
+
+   /**
+    * Is WARN logging currently enabled?
+    *
+    * Call this method to prevent having to perform expensive operations
+    * (for example, <code>String</code> concatination)
+    * when the log level is more than WARN.
+    *
+    * @return  True if the logger is enabled for WARN, false otherwise
+    */
+   public boolean isWarnEnabled()
+   {
+      return m_log.isWarnEnabled();
+   }
+
+   /**
+    * Is ERROR logging currently enabled?
+    *
+    * Call this method to prevent having to perform expensive operations
+    * (for example, <code>String</code> concatination)
+    * when the log level is more than ERROR.
+    *
+    * @return  True if the logger is enabled for ERROR, false otherwise
+    */
+   public boolean isErrorEnabled()
+   {
+      return m_log.isErrorEnabled();
+   }
+
+   /**
+    * Is FATAL logging currently enabled?
+    *
+    * Call this method to prevent having to perform expensive operations
+    * (for example, <code>String</code> concatination)
+    * when the log level is more than FATAL.
+    *
+    * @return  True if the logger is enabled for FATAL, false otherwise
+    */
+   public boolean isFatalEnabled()
+   {
+      return m_log.isFatalEnabled();
+   }
+
+   /**
+    * Is TRACE logging currently enabled?
+    *
+    * Call this method to prevent having to perform expensive operations
+    * (for example, <code>String</code> concatination)
+    * when the log level is more than TRACE.
+    */
+   public boolean isTraceEnabled()
+   {
+      return m_log.isTraceEnabled();
+   }
+
+   /**
+    * <p> Log a message with trace log level. </p>
+    *
+    * @param message log this message
+    */
+   public void trace(Object message)
+   {
+      m_log.trace(message);
+   }
+
+   /**
+    * <p> Log an error with trace log level. </p>
+    *
+    * @param message log this message
+    * @param t log this cause
+    */
+   public void trace(Object message, Throwable t)
+   {
+      m_log.trace(message, t);
+   }
+
+   /**
+    * <p> Log a message with debug log level. </p>
+    *
+    * @param message log this message
+    */
+   public void debug(Object message)
+   {
+      m_log.debug(message);
+      //m_log.log(_fcqn, Priority.DEBUG, message, null);
+   }
+
+   /**
+    * <p> Log an error with debug log level. </p>
+    *
+    * @param message log this message
+    * @param t log this cause
+    */
+   public void debug(Object message, Throwable t)
+   {
+      m_log.debug(message, t);
+   }
+
+   /**
+    * <p> Log a message with info (a.k.a. DEBUG) log level. </p>
+    *
+    * @param message log this message
+    */
+   public void info(Object message)
+   {
+      m_log.debug(message); // level changed
+   }
+
+   /**
+    * <p> Log an error with info (a.k.a. DEBUG) log level. </p>
+    *
+    * @param message log this message
+    * @param t log this cause
+    */
+   public void info(Object message, Throwable t)
+   {
+      m_log.debug(message, t); // level changed
+   }
+
+   /**
+    * <p> Log a message with warn log level. </p>
+    *
+    * @param message log this message
+    */
+   public void warn(Object message)
+   {
+      m_log.warn(message);
+   }
+
+   /**
+    * <p> Log an error with warn log level. </p>
+    *
+    * @param message log this message
+    * @param t log this cause
+    */
+   public void warn(Object message, Throwable t)
+   {
+      m_log.warn(message, t);
+   }
+
+   /**
+    * <p> Log a message with error log level. </p>
+    *
+    * @param message log this message
+    */
+   public void error(Object message)
+   {
+      m_log.error(message);
+   }
+
+   /**
+    * <p> Log an error with error log level. </p>
+    *
+    * @param message log this message
+    * @param t log this cause
+    */
+   public void error(Object message, Throwable t)
+   {
+      m_log.error(message, t);
+   }
+
+   /**
+    * <p> Log a message with fatal log level. </p>
+    *
+    * @param message log this message
+    */
+   public void fatal(Object message)
+   {
+      m_log.fatal(message);
+   }
+
+   /**
+    * <p> Log an error with fatal log level. </p>
+    *
+    * @param message log this message
+    * @param t log this cause
+    */
+   public void fatal(Object message, Throwable t)
+   {
+      m_log.fatal(message, t);
+   }
+}

Modified: labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/LogFactory.java
===================================================================
--- labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/LogFactory.java	2006-12-08 10:47:21 UTC (rev 8135)
+++ labs/jbosstm/trunk/common/classes/com/arjuna/common/util/logging/LogFactory.java	2006-12-08 11:09:02 UTC (rev 8136)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
  * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
+ * full listing of individual contributors.
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
  * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
  * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -31,6 +31,7 @@
 import com.arjuna.common.internal.util.logging.*;
 import com.arjuna.common.internal.util.logging.simpleLog.SimpleLogFactory;
 import com.arjuna.common.internal.util.logging.jakarta.JakartaLogFactory;
+import com.arjuna.common.internal.util.logging.jakarta.JakartaRelevelingLogFactory;
 import com.arjuna.common.util.exceptions.LogConfigurationException;
 
 /**
@@ -138,8 +139,9 @@
     private static final String SIMPLE = "simple";
     private static final String NOOP = "noop";
     //private static final String AVALON = "avalon";
+	private static final String RELEVELER = "log4j_releveler";
 
-    /**
+	/**
      * Interface that encapsulates the underlying, log-system-specific log factory.
      */
     private static LogFactoryInterface m_logFactory = null;
@@ -383,7 +385,14 @@
 
             }
 
-            // USE JAKARTA COMMONS LOGGINGS OWN DISCOVERY MECHANISM
+			// we use a slightly modified wrapper to do log statement level modification
+			// for support of JBossAS log level semantics, see JakartaRelevelingLogger javadoc
+			else if (logSystem.equals(RELEVELER)) {
+				System.setProperty(JCL_LOG_CONFIGURATION, "org.apache.commons.logging.impl.Log4JLogger");
+				m_logFactory = new JakartaRelevelingLogFactory();
+			}
+
+			// USE JAKARTA COMMONS LOGGINGS OWN DISCOVERY MECHANISM
             else if (logSystem.equals(JAKARTA_LOGGER)) {
                 m_logFactory = new JakartaLogFactory();
             }

Modified: labs/jbosstm/trunk/common/tests/com/hp/mwtests/commonlogging/testlevels/TestLevels.java
===================================================================
--- labs/jbosstm/trunk/common/tests/com/hp/mwtests/commonlogging/testlevels/TestLevels.java	2006-12-08 10:47:21 UTC (rev 8135)
+++ labs/jbosstm/trunk/common/tests/com/hp/mwtests/commonlogging/testlevels/TestLevels.java	2006-12-08 11:09:02 UTC (rev 8136)
@@ -1,20 +1,20 @@
 /*
  * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors 
- * as indicated by the @author tags. 
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags.
  * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
+ * full listing of individual contributors.
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
  * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * 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,
  * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
- * 
+ *
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
@@ -34,19 +34,24 @@
    /**
     * CLF logger for this class
     *
-    * the resource bundle to use is the class name if no additional parameters are given.
+    * the resource bundle to use is the fully qualified class name if no additional parameters are given.
     */
-   private static Logi18n log = LogFactory.getLogi18n(CLASS);
+   private static Logi18n log = LogFactory.getLogi18n(CLASS, "TestLevels");
 
    /**
     *
-    * @message testMessage This is the {0} message, logged at level {0}.
+    * @message testMessage This is the {0} message, logged at level {1}.
     *
     * @param args
     */
    public static void main(String[] args)
    {
-      log.debug("testMessage", new Object[] {"1st", "debug"});
+	   // CommonLogging-properties.xml: <common><properties><property name= value=>
+	   // cd common/install/lib
+	   // java -cp jbossts-common.jar:tests/common_tests.jar:../../../ext/commons-logging.jar:../../../ext/log4j-1.2.8.jar:../../etc/ com.hp.mwtests.commonlogging.testlevels.TestLevels
+
+	   System.out.println("running test");
+	  log.debug("testMessage", new Object[] {"1st", "debug"});
       log.info("testMessage", new Object[] {"1st", "info"});
       log.warn("testMessage", new Object[] {"1st", "warn"});
       log.error("testMessage", new Object[] {"1st", "error"});




More information about the jboss-svn-commits mailing list