[slf4j-dev] svn commit: r68 - in slf4j/trunk: . src/docs src/filtered-java/org/slf4j src/filtered-java/org/slf4j/impl tests tests/lib tests/src/java/org/slf4j

ceki at slf4j.org ceki at slf4j.org
Sun May 15 16:30:03 CEST 2005


Author: ceki
Date: Sun May 15 16:30:00 2005
New Revision: 68

Removed:
   slf4j/trunk/tests/lib/log4j-1.2.10.jar
Modified:
   slf4j/trunk/build.xml
   slf4j/trunk/src/docs/overview.html
   slf4j/trunk/src/filtered-java/org/slf4j/LoggerFactory.java
   slf4j/trunk/src/filtered-java/org/slf4j/LoggerFactoryAdapter.java
   slf4j/trunk/src/filtered-java/org/slf4j/impl/JDK14Logger.java
   slf4j/trunk/src/filtered-java/org/slf4j/impl/JDK14LoggerFA.java
   slf4j/trunk/src/filtered-java/org/slf4j/impl/NOPLogger.java
   slf4j/trunk/src/filtered-java/org/slf4j/impl/NOPLoggerFA.java
   slf4j/trunk/src/filtered-java/org/slf4j/impl/SimpleLogger.java
   slf4j/trunk/src/filtered-java/org/slf4j/impl/SimpleLoggerFA.java
   slf4j/trunk/tests/build.xml
   slf4j/trunk/tests/src/java/org/slf4j/InvokingSLF4J.java
Log:

Renamed the org.slf4j.ULogger interface as org.slf4j.Logger



Modified: slf4j/trunk/build.xml
==============================================================================
--- slf4j/trunk/build.xml	(original)
+++ slf4j/trunk/build.xml	Sun May 15 16:30:00 2005
@@ -5,7 +5,7 @@
   <property file="build.properties"/>
 
   <!-- The directory where source files are stored. -->
-  <property name="version" value="1.0-beta1"/>
+  <property name="version" value="1.0-beta2"/>
 
   <property name="tmp.java.source.dir" value="./tmp/src"/>
   <property name="tmp.javac.dest" value="./tmp/classes"/>
@@ -169,8 +169,8 @@
              protected="true"
              author="true"
              use="true"
-             overview="src/docs//overview.html"
-             doctitle="SLF4J version x ${version}"
+             overview="src/docs/overview.html"
+             doctitle="SLF4J version ${version}"
              windowtitle="SLF4J Version ${version}"
              header="&lt;b&gt;SLF4J ${version}&lt;/b&gt;"
              bottom="Copyright 2004-2005 

Modified: slf4j/trunk/src/docs/overview.html
==============================================================================
--- slf4j/trunk/src/docs/overview.html	(original)
+++ slf4j/trunk/src/docs/overview.html	Sun May 15 16:30:00 2005
@@ -1,13 +1,11 @@
 <html>
+<head>
 
-  <head>
-    <title>SLF4J overview</title>
-  </head>
-  <body>
+<title>SLF4J overveiw</title>
+</head>
+<body>
 
-    <p>Make sure to read the <a href="../manual.html"><b>user manual</b></a>
-    in addition to this javadoc documentation.
-    </p>
+<p>Make sure to read the <a href="&#46;&#46;/manual.html"><b>user manual</b></a>
+in addition to this javadoc documentation.
 
-  </body> 
-</html>
+</body> </html>

Modified: slf4j/trunk/src/filtered-java/org/slf4j/LoggerFactory.java
==============================================================================
--- slf4j/trunk/src/filtered-java/org/slf4j/LoggerFactory.java	(original)
+++ slf4j/trunk/src/filtered-java/org/slf4j/LoggerFactory.java	Sun May 15 16:30:00 2005
@@ -66,19 +66,19 @@
     }
   }
 
-  public static ULogger getLogger(String name) {
+  public static Logger getLogger(String name) {
     return adapter.getLogger(name);
   }
 
-  public static ULogger getLogger(String domainName, String subDomainName) {
+  public static Logger getLogger(String domainName, String subDomainName) {
     return adapter.getLogger(domainName, subDomainName);
   }
 
-  public static ULogger getLogger(Class clazz) {
+  public static Logger getLogger(Class clazz) {
     return adapter.getLogger(clazz.getName());
   }
 
-  public static ULogger getLogger(Class clazz, String subDomainName) {
+  public static Logger getLogger(Class clazz, String subDomainName) {
     return adapter.getLogger(clazz.getName(), subDomainName);
   }
 }

Modified: slf4j/trunk/src/filtered-java/org/slf4j/LoggerFactoryAdapter.java
==============================================================================
--- slf4j/trunk/src/filtered-java/org/slf4j/LoggerFactoryAdapter.java	(original)
+++ slf4j/trunk/src/filtered-java/org/slf4j/LoggerFactoryAdapter.java	Sun May 15 16:30:00 2005
@@ -45,16 +45,16 @@
 public interface LoggerFactoryAdapter {
   
   /**
-   * Return the appropriate named {@link ULogger} instance.
+   * Return the appropriate named {@link Logger} instance.
    */
-  public ULogger getLogger(String name);
+  public Logger getLogger(String name);
   
   /**
-   * Return a {@link ULogger} instance in <code>domain</code>, <code>subDomain</code>. 
+   * Return a {@link Logger} instance in <code>domain</code>, <code>subDomain</code>. 
    *
    * @param domain
    * @param subDomain
-   * @return ULogger instance
+   * @return Logger instance
    */
-  public ULogger getLogger(String domain, String subDomain);  
+  public Logger getLogger(String domain, String subDomain);  
 }

Modified: slf4j/trunk/src/filtered-java/org/slf4j/impl/JDK14Logger.java
==============================================================================
--- slf4j/trunk/src/filtered-java/org/slf4j/impl/JDK14Logger.java	(original)
+++ slf4j/trunk/src/filtered-java/org/slf4j/impl/JDK14Logger.java	Sun May 15 16:30:00 2005
@@ -32,24 +32,24 @@
  */
 
 package org.slf4j.impl;
-import org.slf4j.ULogger;
+import org.slf4j.Logger;
 
 import java.util.logging.Level;
-import java.util.logging.Logger;
 
 
 /**
- * A wrapper over @{link java.utill.Logger} which conforms to the 
- * {@link ULogger} interface.
+ * A wrapper over {@link java.util.logging.Logger
+ * java.util.logging.Logger} which conforms to the {@link Logger}
+ * interface.
  * 
  * @author Ceki G&uuml;lc&uuml;
  */
-public class JDK14Logger implements ULogger {
-  final Logger logger;
+public class JDK14Logger implements Logger {
+  final java.util.logging.Logger logger;
 
   // WARN: JDK14Logger constructor should have only package access so that
   // only JDK14LoggerFA be able to create one.
-  JDK14Logger(Logger logger) {
+  JDK14Logger(java.util.logging.Logger logger) {
     this.logger = logger;
   }
 

Modified: slf4j/trunk/src/filtered-java/org/slf4j/impl/JDK14LoggerFA.java
==============================================================================
--- slf4j/trunk/src/filtered-java/org/slf4j/impl/JDK14LoggerFA.java	(original)
+++ slf4j/trunk/src/filtered-java/org/slf4j/impl/JDK14LoggerFA.java	Sun May 15 16:30:00 2005
@@ -34,33 +34,35 @@
 package org.slf4j.impl;
 
 import org.slf4j.LoggerFactoryAdapter;
-import org.slf4j.ULogger;
+import org.slf4j.Logger;
 
 import java.util.HashMap;
 import java.util.Map;
-import java.util.logging.Logger;
-
 
 /**
+ * JDK14LoggerFA is an implementation of {@link LoggerFactoryAdapter}
+ * returning the appropriate named {@link JDK14Logger} instance.
  *
  * @author Ceki G&uuml;lc&uuml;
  */
 public class JDK14LoggerFA implements LoggerFactoryAdapter {
-  Map map;
+
+  // key: name (String), value: a JDK14Logger;
+  Map loggerMap;
 
   public JDK14LoggerFA() {
-    map = new HashMap();
+    loggerMap = new HashMap();
   }
 
   /* (non-Javadoc)
    * @see org.slf4j.LoggerFactoryAdapter#getLogger(java.lang.String)
    */
-  public ULogger getLogger(String name) {
-    ULogger ulogger = (ULogger) map.get(name);
+  public Logger getLogger(String name) {
+    Logger ulogger = (Logger) loggerMap.get(name);
     if (ulogger == null) {
-      Logger logger = Logger.getLogger(name);
+      java.util.logging.Logger logger = java.util.logging.Logger.getLogger(name);
       ulogger = new JDK14Logger(logger);
-      map.put(name, ulogger);
+     loggerMap.put(name, ulogger);
     }
     return ulogger;
   }
@@ -68,7 +70,7 @@
   /* (non-Javadoc)
    * @see org.slf4j.LoggerFactoryAdapter#getLogger(java.lang.String, java.lang.String)
    */
-  public ULogger getLogger(String domainName, String subDomainName) {
+  public Logger getLogger(String domainName, String subDomainName) {
     return getLogger(domainName);
   }
 }

Modified: slf4j/trunk/src/filtered-java/org/slf4j/impl/NOPLogger.java
==============================================================================
--- slf4j/trunk/src/filtered-java/org/slf4j/impl/NOPLogger.java	(original)
+++ slf4j/trunk/src/filtered-java/org/slf4j/impl/NOPLogger.java	Sun May 15 16:30:00 2005
@@ -33,15 +33,15 @@
 
 package org.slf4j.impl;
 
-import org.slf4j.ULogger;
+import org.slf4j.Logger;
 
 
 /**
- * A no operation (NOP) implementation of {@link ULogger}.
+ * A no operation (NOP) implementation of {@link Logger}.
  * 
  * @author Ceki G&uuml;lc&uuml;
  */
-public class NOPLogger implements ULogger {
+public class NOPLogger implements Logger {
 
   /**
    * The unique instance of NOPLogger.

Modified: slf4j/trunk/src/filtered-java/org/slf4j/impl/NOPLoggerFA.java
==============================================================================
--- slf4j/trunk/src/filtered-java/org/slf4j/impl/NOPLoggerFA.java	(original)
+++ slf4j/trunk/src/filtered-java/org/slf4j/impl/NOPLoggerFA.java	Sun May 15 16:30:00 2005
@@ -34,7 +34,7 @@
 package org.slf4j.impl;
 
 import org.slf4j.LoggerFactoryAdapter;
-import org.slf4j.ULogger;
+import org.slf4j.Logger;
 
 
 /**
@@ -49,10 +49,10 @@
     // nothing to do
   }
   
-  public ULogger getLogger(String name) {
+  public Logger getLogger(String name) {
     return NOPLogger.NOP_LOGGER;
   }
-  public ULogger getLogger(String domainName, String subDomainName) {
+  public Logger getLogger(String domainName, String subDomainName) {
     return NOPLogger.NOP_LOGGER;  
   }  
 }

Modified: slf4j/trunk/src/filtered-java/org/slf4j/impl/SimpleLogger.java
==============================================================================
--- slf4j/trunk/src/filtered-java/org/slf4j/impl/SimpleLogger.java	(original)
+++ slf4j/trunk/src/filtered-java/org/slf4j/impl/SimpleLogger.java	Sun May 15 16:30:00 2005
@@ -33,7 +33,7 @@
 
 package org.slf4j.impl;
 
-import org.slf4j.ULogger;
+import org.slf4j.Logger;
 
 
 /**
@@ -58,7 +58,7 @@
  * 
  * @author Ceki G&uuml;lc&uuml;
  */
-public class SimpleLogger implements ULogger {
+public class SimpleLogger implements Logger {
 
   String loggerName;
   

Modified: slf4j/trunk/src/filtered-java/org/slf4j/impl/SimpleLoggerFA.java
==============================================================================
--- slf4j/trunk/src/filtered-java/org/slf4j/impl/SimpleLoggerFA.java	(original)
+++ slf4j/trunk/src/filtered-java/org/slf4j/impl/SimpleLoggerFA.java	Sun May 15 16:30:00 2005
@@ -37,7 +37,7 @@
 import java.util.Map;
 
 import org.slf4j.LoggerFactoryAdapter;
-import org.slf4j.ULogger;
+import org.slf4j.Logger;
 
 
 /**
@@ -59,8 +59,8 @@
    * Return an appropriate {@link SimpleLogger} instance by name. 
    * 
    */
-  public ULogger getLogger(String name) {
-    ULogger ulogger = (ULogger) map.get(name);
+  public Logger getLogger(String name) {
+    Logger ulogger = (Logger) map.get(name);
     if(ulogger == null) {
       ulogger = new SimpleLogger(name);
       map.put(name, ulogger);
@@ -72,7 +72,7 @@
    *  (non-Javadoc)
    * @see org.slf4j.LoggerFactoryAdapter#getLogger(java.lang.String, java.lang.String)
    */
-  public ULogger getLogger(String domainName, String subDomainName) {
+  public Logger getLogger(String domainName, String subDomainName) {
     return getLogger(domainName);
   }
   

Modified: slf4j/trunk/tests/build.xml
==============================================================================
--- slf4j/trunk/tests/build.xml	(original)
+++ slf4j/trunk/tests/build.xml	Sun May 15 16:30:00 2005
@@ -32,10 +32,10 @@
     <pathelement location="../slf4j-jdk14.jar"/>
   </path>
 
-   <path id="log4j1210.classpath">
+   <path id="nlog4j1212.classpath">
      <path refid="basic.classpath"/>
      <fileset dir="lib">
-       <include name="log4j-1.2.10.jar"/>
+       <include name="nlog4j-1.2.12.jar"/>
      </fileset>
   </path>
 
@@ -143,12 +143,12 @@
   </target>
 
 
-  <target name="InvokeLog4j1210" depends="build, cleanOutputDir">
+  <target name="InvokeNLOG4J1212" depends="build, cleanOutputDir">
     
-    <copy file="input/log4j1210/basic.xml" tofile="${tests.javac.dest}/log4j.xml"/>
+    <copy file="input/nlog4j1212/basic.xml" tofile="${tests.javac.dest}/log4j.xml"/>
 
     <junit printsummary="yes" fork="yes" haltonfailure="yes">
-      <classpath refid="log4j1210.classpath"/>
+      <classpath refid="nlog4j1212.classpath"/>
       <formatter type="plain" usefile="false"/>
       <test name="org.slf4j.InvokingSLF4J" />
     </junit>

Modified: slf4j/trunk/tests/src/java/org/slf4j/InvokingSLF4J.java
==============================================================================
--- slf4j/trunk/tests/src/java/org/slf4j/InvokingSLF4J.java	(original)
+++ slf4j/trunk/tests/src/java/org/slf4j/InvokingSLF4J.java	Sun May 15 16:30:00 2005
@@ -63,12 +63,12 @@
   }
   
   public void test1() {
-    ULogger logger = LoggerFactory.getLogger("test1");
+    Logger logger = LoggerFactory.getLogger("test1");
     logger.debug("Hello world.");
   }
   
   public void test2() {
-    ULogger logger = LoggerFactory.getLogger("test2");
+    Logger logger = LoggerFactory.getLogger("test2");
     logger.debug("Hello world 1.");
     logger.info("Hello world 2.");
   }



More information about the slf4j-dev mailing list