[jboss-svn-commits] JBoss Common SVN: r2851 - in common-old/branches/Branch_1_0: src/main/org/jboss/logging and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri May 23 14:55:59 EDT 2008


Author: dimitris at jboss.org
Date: 2008-05-23 14:55:59 -0400 (Fri, 23 May 2008)
New Revision: 2851

Modified:
   common-old/branches/Branch_1_0/build-thirdparty.xml
   common-old/branches/Branch_1_0/src/main/org/jboss/logging/Log4jLoggerPlugin.java
   common-old/branches/Branch_1_0/src/main/org/jboss/logging/XLevel.java
Log:
JBCOMMON-22, revert the changes from JBCOMMON 20.

Modified: common-old/branches/Branch_1_0/build-thirdparty.xml
===================================================================
--- common-old/branches/Branch_1_0/build-thirdparty.xml	2008-05-23 17:28:13 UTC (rev 2850)
+++ common-old/branches/Branch_1_0/build-thirdparty.xml	2008-05-23 18:55:59 UTC (rev 2851)
@@ -45,7 +45,7 @@
       -->
 
       <componentref name="apache-xerces" version="2.7.1"/>
-      <componentref name="apache-log4j" version="1.2.14"/>  
+      <componentref name="apache-log4j" version="1.2.8"/>  
       <componentref name="apache-slide" version="1.0.16"/> 
       <componentref name="wutka-dtdparser" version="1.2.1"/>
       <componentref name="oswego-concurrent" version="1.3.4"/>  

Modified: common-old/branches/Branch_1_0/src/main/org/jboss/logging/Log4jLoggerPlugin.java
===================================================================
--- common-old/branches/Branch_1_0/src/main/org/jboss/logging/Log4jLoggerPlugin.java	2008-05-23 17:28:13 UTC (rev 2850)
+++ common-old/branches/Branch_1_0/src/main/org/jboss/logging/Log4jLoggerPlugin.java	2008-05-23 18:55:59 UTC (rev 2851)
@@ -1,29 +1,29 @@
 /*
- * 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.
- */
+* 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 org.apache.log4j.LogManager;
+import org.apache.log4j.Level;
 import org.apache.log4j.Category;
-import org.apache.log4j.Level;
-import org.apache.log4j.LogManager;
 import org.apache.log4j.Priority;
 
 /**
@@ -35,7 +35,21 @@
  *
  * @author  <a href="mailto:sacha.labourey at cogito-info.ch">Sacha Labourey</a>.
  * @version $Revision$
+ *
+ * <p><b>Revisions:</b>
+ *
+ * <p><b>3. mai 2002 Sacha Labourey:</b>
+ * <ul>
+ * <li> First implementation </li>
+ * </ul>
+ * </p>
+ * <p><b>4. february 2003 Dag Liodden:</b>
+ * <ul>
+ *   <li>Fixed Log4J locationinfo by sending the fully qualified classname of <code>Logger</code> to Log4J</li>
+ * </ul>
+ * </p>
  */
+
 public class Log4jLoggerPlugin implements LoggerPlugin
 {
    
@@ -82,28 +96,27 @@
    
    public boolean isTraceEnabled()
    {      
-      Level l = Level.TRACE;
-      if (log.isEnabledFor(l) == false)
+      if (log.isEnabledFor(XLevel.TRACE) == false)
          return false;
-      return l.isGreaterOrEqual(log.getEffectiveLevel());
+      return XLevel.TRACE.isGreaterOrEqual(log.getEffectiveLevel());
    }
 
    /** 
     * Issue a log msg with a level of TRACE.
-    * Invokes log.log(Level.TRACE, message);
+    * Invokes log.log(XLevel.TRACE, message);
     */
    public void trace(Object message)
    {
-      log.log(FQCN, Level.TRACE, message, null);
+      log.log(FQCN, XLevel.TRACE, message, null);
    }
 
    /** 
     * Issue a log msg and throwable with a level of TRACE.
-    * Invokes log.log(Level.TRACE, message, t);
+    * Invokes log.log(XLevel.TRACE, message, t);
     */
    public void trace(Object message, Throwable t)
    {
-      log.log(FQCN, Level.TRACE, message, t);
+      log.log(FQCN, XLevel.TRACE, message, t);
    }
 
    /**

Modified: common-old/branches/Branch_1_0/src/main/org/jboss/logging/XLevel.java
===================================================================
--- common-old/branches/Branch_1_0/src/main/org/jboss/logging/XLevel.java	2008-05-23 17:28:13 UTC (rev 2850)
+++ common-old/branches/Branch_1_0/src/main/org/jboss/logging/XLevel.java	2008-05-23 18:55:59 UTC (rev 2851)
@@ -1,47 +1,49 @@
 /*
- * 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.
- */
+* 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 org.apache.log4j.Level;
 
 /** 
  * Provides custom extention levels for use with the Log4j logging framework.
+ *
  * <p>
  * Adds a trace level that is below the standard Log4j <tt>DEBUG</tt> level.
+ *
  * <p>
- * This is a custom level that is 100 below the {@link Level#TRACE_INT} 
+ * This is a custom level that is 100 below the {@link Level#DEBUG_INT} 
  * and represents a lower level useful for logging events that should only
  * be displayed when deep debugging is required.
  *
  * @see org.apache.log4j.Level
- * @deprecated as log4j 1.2.14 has a native TRACE level
- * 
+ *
  * @author  <a href="mailto:Scott.Stark at jboss.org">Scott Stark</a>
  * @version $Revision$
  */
-public class XLevel extends Level
+public class XLevel 
+   extends Level
 {
-   /** The integer representation of the level, ({@link Level#TRACE_INT} - 100) */
-   public static final int TRACE_INT = Level.TRACE_INT - 100;
+   /** The integer representation of the level, ({@link Level#DEBUG_INT} - 100) */
+   public static final int TRACE_INT = Level.DEBUG_INT - 100;
 
    /** The string name of the trace level. */
    public static final String TRACE_STR = "TRACE";




More information about the jboss-svn-commits mailing list