[LOGBack-dev] svn commit: r570 - in logback/trunk/logback-classic/src/main/java: ch/qos/logback/classic/pattern ch/qos/logback/classic/spi org/slf4j org/slf4j/impl org/slf4j/spi

noreply.ceki at qos.ch noreply.ceki at qos.ch
Tue Sep 12 23:19:47 CEST 2006


Author: ceki
Date: Tue Sep 12 23:19:47 2006
New Revision: 570

Removed:
   logback/trunk/logback-classic/src/main/java/org/slf4j/ILoggerFactory.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/IMarkerFactory.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/Logger.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/Marker.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/impl/BasicMarker.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/impl/BasicMarkerFactory.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/impl/JDK14LoggerAdapter.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/impl/JDK14LoggerFactory.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/impl/MarkerIgnoringBase.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/impl/MessageFormatter.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/impl/NOPLogger.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/impl/NOPLoggerFactory.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/impl/SimpleLogger.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/impl/SimpleLoggerFactory.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/impl/SystemPropBinder.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/impl/Util.java
   logback/trunk/logback-classic/src/main/java/org/slf4j/spi/
Modified:
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/ClassicConverter.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/DateConverter.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/LoggerContextAwareBase.java

Log:

- slf4j-api 1.1.0-beta0 is now a logback-classic dependency
 
consequently, several classes which were both in lb-classic and slf4j-api 
were removed (from classic).

- getLogger method was removed from LoggerContextAware (we no longer need loggers
 to report internal errors as we use Status instead)
  DateConverter and ClassicConverter were modified as a consequence to use Status instead
 of logger


Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/ClassicConverter.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/ClassicConverter.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/ClassicConverter.java	Tue Sep 12 23:19:47 2006
@@ -9,8 +9,6 @@
  */
 package ch.qos.logback.classic.pattern;
 
-import org.slf4j.Logger;
-
 import ch.qos.logback.classic.LoggerContext;
 import ch.qos.logback.classic.spi.LoggerContextAware;
 import ch.qos.logback.classic.spi.LoggerContextAwareBase;
@@ -34,10 +32,6 @@
     lcab.setLoggerContext(lc);
   }
 
-  public Logger getLogger() {
-    return lcab.getLogger(this);
-  }
-
   public void setContext(Context context) {
     lcab.setContext(context);
   }

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/DateConverter.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/DateConverter.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/DateConverter.java	Tue Sep 12 23:19:47 2006
@@ -36,8 +36,7 @@
       simpleFormat = new SimpleDateFormat(datePattern);
       //maximumCacheValidity = CachedDateFormat.getMaximumCacheValidity(pattern);
     } catch (IllegalArgumentException e) {
-      getLogger().warn(
-        "Could not instantiate SimpleDateFormat with pattern " + datePattern, e);
+      addWarn("Could not instantiate SimpleDateFormat with pattern " + datePattern, e);
       // default to the ISO8601 format
       simpleFormat = new SimpleDateFormat(CoreGlobal.ISO8601_PATTERN);
     }

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/LoggerContextAwareBase.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/LoggerContextAwareBase.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/spi/LoggerContextAwareBase.java	Tue Sep 12 23:19:47 2006
@@ -9,10 +9,6 @@
  */
 package ch.qos.logback.classic.spi;
 
-import org.slf4j.Logger;
-import org.slf4j.impl.SimpleLogger;
-import org.slf4j.impl.SimpleLoggerFactory;
-
 import ch.qos.logback.classic.LoggerContext;
 import ch.qos.logback.core.Context;
 import ch.qos.logback.core.spi.ContextAwareBase;
@@ -20,8 +16,6 @@
 
 public class LoggerContextAwareBase extends ContextAwareBase implements LoggerContextAware {
   
-  private Logger logger;
-
   /**
    * Set the owning context. The owning context cannot be set more than
    * once.
@@ -49,42 +43,4 @@
     return (LoggerContext) context;
   }
   
-  /**
-   * Return an instance specific logger to be used by the component itself.
-   * This logger is not intended to be accessed by the end-user, hence the 
-   * protected keyword.
-   * 
-   * <p>In case the context for this component is not set,
-   * this implementations returns a {@link SimpleLogger} instance.
-   * 
-   * @return A Logger instance.
-   */
-  protected Logger getLogger() {
-    return getLogger(this);
-  } 
-
-  /**
-   * Return an instance specific logger to be used by the calling component.
-   * This logger is not intended to be accessed by the end-user but by LOGBack
-   * components.
-   *  
-   * <p>In case the context for this component is not set,
-   * this implementations returns a {@link SimpleLogger} instance.
-   * 
-   * @return A Logger instance.
-   */
-
-  public Logger getLogger(Object component) {
-    if(logger == null) {
-      if(context != null) {
-        logger = ((LoggerContext) context).getLogger(component.getClass().getName());
-      } else {
-        logger = SimpleLoggerFactory.INSTANCE.getLogger(component.getClass().getName());
-      }
-    } 
-    return logger;
-  }
-
-
-  
 }



More information about the logback-dev mailing list